11/*
2- * Copyright (c) 2008, 2022 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2008, 2023 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2525
2626package sun .nio .fs ;
2727
28- import java .nio .file .attribute .*;
29- import java .util .concurrent .TimeUnit ;
30- import java .util .Set ;
28+ import java .nio .file .attribute .BasicFileAttributes ;
29+ import java .nio .file .attribute .FileTime ;
30+ import java .nio .file .attribute .GroupPrincipal ;
31+ import java .nio .file .attribute .PosixFileAttributes ;
32+ import java .nio .file .attribute .PosixFilePermission ;
33+ import java .nio .file .attribute .UserPrincipal ;
3134import java .util .HashSet ;
35+ import java .util .Set ;
36+ import java .util .concurrent .TimeUnit ;
3237
3338/**
3439 * Unix implementation of PosixFileAttributes.
@@ -52,6 +57,7 @@ class UnixFileAttributes
5257 private long st_ctime_sec ;
5358 private long st_ctime_nsec ;
5459 private long st_birthtime_sec ;
60+ private long st_birthtime_nsec ;
5561
5662 // created lazily
5763 private volatile UserPrincipal owner ;
@@ -158,7 +164,7 @@ public FileTime lastAccessTime() {
158164 @ Override
159165 public FileTime creationTime () {
160166 if (UnixNativeDispatcher .birthtimeSupported ()) {
161- return FileTime . from (st_birthtime_sec , TimeUnit . SECONDS );
167+ return toFileTime (st_birthtime_sec , st_birthtime_nsec );
162168 } else {
163169 // return last modified when birth time not supported
164170 return lastModifiedTime ();
0 commit comments