Re: Determing if a file has changed
by $Bill Luebkert other posts by this author
Jan 31 2003 5:03PM messages near this date
view in the new Beta List Site
Re: Determing if a file has changed
|
RE: Win32::lanman?
Neil wrote:
>
> Basically, I want to open a file, read the contents, and munge the data and
> write it out to a second file.
>
> BUT ... if the original data file changes - I'd like to reparse/remung
> before writing.
>
> Unfortunately, last mod time does not work IF the data was changed twice in
> the last second.
>
> Size doesn't work because a byte chould be changed with no change in
> size..and twice in the last second.
>
> I was hoping that there could be some kind of checksum solution.
You could checksum the file after slurping it using unpack or Digest::MD5
You could then later on check the file again and see if the checksum is
different. Probably not necessary though - the mtime is probably sufficient
if the content changes that often. You could also check into serial use
of the file as a solution (some sort of locking if you can modify the
other writer).
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / ) // // DBE Collectibles Mailto:dbe@[...].com
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Neil
Alan Dickey
$Bill Luebkert
|