Same file?
Andre Garzia
andre at andregarzia.com
Fri Apr 16 18:19:02 EDT 2010
Jeff,
put the md5digest of url ("binfile:" & path1) into tMD5file1
put the md5digest of url ("binfile:" & path2) into tMD5file2
if tMD5file1 is tMD5file2 then
return true
else
return false
end if
PS: this checks for the equality of files no matter the path, if you want
just to see if the paths are equivalent then it is another business.
On Fri, Apr 16, 2010 at 6:21 PM, Jeff Massung <massung at gmail.com> wrote:
> Is there a nice little way in Rev to check and see if two file paths are
> the
> same? For example:
>
> "../../../Home/jeff/foo.txt"
> "/Users/Home/jeff/foo.txt"
> "c:\Users\Home\jeff\foo.txt"
>
> These may all actually be the same file. Before I go down the road of
> directory traversals, file path separators, and drive name parsing... is
> there a way for me to know in Rev if they are the same easily?
>
> Jeff M.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
--
http://www.andregarzia.com All We Do Is Code.
More information about the use-livecode
mailing list