Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8011536

(fs) BasicFileAttributes.creationTime() should return birth time (mac)

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • P3
    • Resolution: Fixed
    • 7u4
    • 8
    • core-libs
    • None
    • b89
    • Verified

    Description

      FULL PRODUCT VERSION :
      java version " 1.7.0_17 "
      Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
      Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      OS X 10.7.5

      A DESCRIPTION OF THE PROBLEM :
      IWhen I try to get the creation file attribute of a file on OS X Lion using Java nio 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 I think that BasicFileAttributes.creationTime method should return the right value on OS X.



      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Activity

          People

            alanb Alan Bateman
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: