denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Help with File modification time???


From: Josue Abarca
Subject: Re: [Denemo-devel] Help with File modification time???
Date: Wed, 26 Sep 2012 14:56:08 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 26, 2012 at 06:46:16PM +0100, Richard Shann wrote:
> There is a problem with the print view update which comes down to the
> question: How do you tell if a file has changed.
> Currently I am using stat() and looking at mtime, but only the seconds
> are being stored it seems, no sub-second precision.
> What is the right way to test if a file has changed?
> Richard

According to [0] and [1] you can use stat and look at mtim (note: no
trailing e).

st_mtim.tv_nsec <- to see the nano seconds.

(of course the file system must support nanoseconds time stamps)

[0] 
http://stackoverflow.com/questions/5086471/how-to-display-file-last-modification-time-on-linux#tab-top
[1] http://linux.die.net/man/2/stat

-- 
Josué M. Abarca S.
Vos mereces Software Libre.
PGP key 4096R/70D8FB2A 2009-06-17
Huella de clave = B3ED 4984 F65A 9AE0 6511  DAF4 756B EB4B 70D8 FB2A



reply via email to

[Prev in Thread] Current Thread [Next in Thread]