5

I just recognized that Mac Os X does not return any millisecond information to java.io.File#lastModified() method.

The long values are rounded, so the most specific kind of information is the second after transfer to a DateTime Object.

Is there a way to get those information some other way, maybe through the java.nio.file.Files#readAttributes(Path,Class,LinkOption[]) method, or want it be possible to distinguish between milliseconds?

Eric Tobias
  • 3,225
  • 4
  • 32
  • 50
Macilias
  • 3,279
  • 2
  • 31
  • 43

1 Answers1

10

This is a limitation of the file system, not of the Java API. According to the format specification HFS+ only stores timestamps to a granularity of one second.

Ian Roberts
  • 120,891
  • 16
  • 170
  • 183