Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File.setLastModified()



Kirill Kalishev <email@hidden> wrote:

>Does anybody know why File.setLastModifed() doesn't work?
>It reports success, but even after several seconds File.lastModifed()
>returns the same value

Please be specific.  Exactly what argument was passed to setLastModifed(),
and what was the file's lastModified() value when that happened?  Where was
the file (local or networked)?  What disk format?  And as usual, which OS
and Java version?

The actual "resolution" (precision, granularity) of a timestamp is
file-system dependent.  HFS and HFS+ store 1-sec resolution.  I think UFS
does, too.  Other file-system formats may have better resolution, or worse.
For example, I think FAT (DOS) has 2-sec resolution (FAT is often used on
flash-drives, camera cards, etc.).

So although the File methods work in millisecs, the actual resolution may
be much coarser.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.