@Override
  public @Nullable Object get(File file, String attribute) {
    switch (attribute) {
      case "size":
        return file.size();
      case "fileKey":
        return file.id();
      case "isDirectory":
        return file.isDirectory();
      case "isRegularFile":
        return file.isRegularFile();
      case "isSymbolicLink":
        return file.isSymbolicLink();
      case "isOther":
        return !file.isDirectory() && !file.isRegularFile() && !file.isSymbolicLink();
      case "creationTime":
        return file.getCreationTime();
      case "lastAccessTime":
        return file.getLastAccessTime();
      case "lastModifiedTime":
        return file.getLastModifiedTime();
      default:
        return null;
    }
  }
Attribute provider that provides attributes common to all file systems, the {@link
BasicFileAttributeView} ("basic" or no view prefix), and allows the reading of {@link
BasicFileAttributes}.

@author Colin Decker
jimfs/src/main/java/com/google/common/jimfs/BasicAttributeProvider.java