jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java
changeset 8158 77d9c0f1c19f
parent 5506 202f599c92aa
child 9035 1255eb81cc2f
equal deleted inserted replaced
7988:d31b7cc371ef 8158:77d9c0f1c19f
   122         return FileTime.from(st_atime, TimeUnit.SECONDS);
   122         return FileTime.from(st_atime, TimeUnit.SECONDS);
   123     }
   123     }
   124 
   124 
   125     @Override
   125     @Override
   126     public FileTime creationTime() {
   126     public FileTime creationTime() {
   127         return null;
   127         return lastModifiedTime();
   128     }
   128     }
   129 
   129 
   130     @Override
   130     @Override
   131     public boolean isRegularFile() {
   131     public boolean isRegularFile() {
   132        return ((st_mode & UnixConstants.S_IFMT) == UnixConstants.S_IFREG);
   132        return ((st_mode & UnixConstants.S_IFMT) == UnixConstants.S_IFREG);
   192     }
   192     }
   193 
   193 
   194     @Override
   194     @Override
   195     public Set<PosixFilePermission> permissions() {
   195     public Set<PosixFilePermission> permissions() {
   196         int bits = (st_mode & UnixConstants.S_IAMB);
   196         int bits = (st_mode & UnixConstants.S_IAMB);
   197         HashSet<PosixFilePermission> perms = new HashSet<PosixFilePermission>();
   197         HashSet<PosixFilePermission> perms = new HashSet<>();
   198 
   198 
   199         if ((bits & UnixConstants.S_IRUSR) > 0)
   199         if ((bits & UnixConstants.S_IRUSR) > 0)
   200             perms.add(PosixFilePermission.OWNER_READ);
   200             perms.add(PosixFilePermission.OWNER_READ);
   201         if ((bits & UnixConstants.S_IWUSR) > 0)
   201         if ((bits & UnixConstants.S_IWUSR) > 0)
   202             perms.add(PosixFilePermission.OWNER_WRITE);
   202             perms.add(PosixFilePermission.OWNER_WRITE);