I need to get the creation time attribute of a file on OS X Lion. I have tried with Java nio, but it returns the modification time instead:
BasicFileAttributes attr = Files.readAttributes(path, BasicFileAttributes.class);
System.out.println("Creation time: " + attr.creationTime());
I have read similar questions (Determine file creation date in Java) and I know that some file systems don't support file creation timestamps but HFSP does so shouldn't BasicFileAttributes.creationTime method return the right value on OS X?