public static FileObject getRootFileSystem(FileObject fileObject) {
    try {
      if ((fileObject == null) || !fileObject.exists()) {
        return null;
      }

      return fileObject.getFileSystem().getRoot();
    } catch (FileSystemException ex) {
      return null;
    }
  }
Returns the root file system of a file representation

@param fileObject A file abstraction
@return the root file system of a file representation
olv-vfs/src/main/java/pl/otros/vfs/browser/util/VFSUtils.java