コード例 #1
0
 @Override
 public Map<String, Object> readAttributes(String[] requested) throws IOException {
   AttributesBuilder builder = AttributesBuilder.create(posixAttributeNames, requested);
   PosixFileAttributes attrs = readAttributes();
   addRequestedPosixAttributes(attrs, builder);
   return builder.unmodifiableMap();
 }
コード例 #2
0
 @Override
 public Map<String, Object> readAttributes(String[] requested) throws IOException {
   AttributesBuilder builder = AttributesBuilder.create(unixAttributeNames, requested);
   UnixFileAttributes attrs = readAttributes();
   addRequestedPosixAttributes(attrs, builder);
   if (builder.match(MODE_NAME)) builder.add(MODE_NAME, attrs.mode());
   if (builder.match(INO_NAME)) builder.add(INO_NAME, attrs.ino());
   if (builder.match(DEV_NAME)) builder.add(DEV_NAME, attrs.dev());
   if (builder.match(RDEV_NAME)) builder.add(RDEV_NAME, attrs.rdev());
   if (builder.match(NLINK_NAME)) builder.add(NLINK_NAME, attrs.nlink());
   if (builder.match(UID_NAME)) builder.add(UID_NAME, attrs.uid());
   if (builder.match(GID_NAME)) builder.add(GID_NAME, attrs.gid());
   if (builder.match(CTIME_NAME)) builder.add(CTIME_NAME, attrs.ctime());
   return builder.unmodifiableMap();
 }