# pass in a file name, a file handle or nothing # returns a unique string that changes when the file changes sub FileMeta { if (my $fh = shift) { my ($dev, $inode, $size, $mtime) = (stat($fh))[0,1,7,9]; return "$size:$dev;$inode:$mtime"; } else { my ($dev, $inode, $size, $mtime) = (stat(_))[0,1,7,9]; return "$size:$dev;$inode:$mtime"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Did that file change?
by davidrw (Prior) on Jun 01, 2006 at 02:01 UTC | |
by whio (Beadle) on Jun 01, 2006 at 09:03 UTC | |
by davidrw (Prior) on Jun 01, 2006 at 12:34 UTC | |
by ruzam (Curate) on Jun 02, 2006 at 18:51 UTC | |
by ruzam (Curate) on Jun 01, 2006 at 03:10 UTC | |
|
Re: Did that file change? (-size, +ctime)
by tye (Sage) on Jun 03, 2006 at 05:37 UTC | |
by BrowserUk (Patriarch) on Jun 03, 2006 at 07:33 UTC |