Same file?

Jeff Massung massung at gmail.com
Fri Apr 16 18:30:20 EDT 2010


Ya, I really don't want to compare the data in the files, just whether the
paths point to the same final location.

Thanks, though.

Jeff M.

On Fri, Apr 16, 2010 at 5:19 PM, Andre Garzia <andre at andregarzia.com> wrote:

> 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.
> _______________________________________________
> 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
>



More information about the use-livecode mailing list