code: public static FileObject toFileObject(File file) {
          if (file == null) {
              return null;
          }
          try {
              return getFileSystemManager().toFileObject(file);
          } catch (FileSystemException e) {
              throw new IllegalStateException(e);
          }
      }
docs: Converts a {@link File} to a FileObject.
  
  @param file
  @return