DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Which File Is Newer?

  • submit to reddit
    newer?: func [
        {Returns true if target-1 was modified more recently than target-2;
        false otherwise.}
        target-1 [file! url!]
        target-2 [file! url!]
        if not exists? target-1 [return false]
        either any [
            all [
                (not none? modified? target-1)
                (none? modified? target-2)
            (greater? modified? target-1 modified? target-2)
        ] [true] [false]