6 Replies Latest reply on Apr 11, 2013 11:04 PM by EJP

    File creation time in OSX with Java 7

    1000720
      I need to get the creation file 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 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?

      Thanks.