Same file?
Paul D. DeRocco
pderocco at ix.netcom.com
Fri Apr 16 19:33:11 EDT 2010
> From: Richard Gaskin
>
> Andre wrote:
>
> > 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
>
> Andre, you've been programming too deeply for too long. :)
>
> MD5digest is great for storing small signatures of large files, but
> since the function reads the full file contents it can simply use:
>
> if url ("binfile:"& path1) is url ("binfile:"& path2) then
> ...
I expect that loads both files into RAM in their entirety before comparing
them, while computing a digest of each doesn't.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco at ix.netcom.com
More information about the use-livecode
mailing list