{@inheritDoc}

@see java.nio.file.spi.FileSystemProvider#getFileStore(java.nio.file.Path)
483324
@Override
    public FileStore getFileStore(final Path path) throws IOException {
        final FileStore fileStore = path.getFileSystem().getFileStores().iterator().next();
        return fileStore;
    }
1346987
private static Path getDirectory(FileSystem fs, Path path) {
    try {
      if (!fs.exists(path) || fs.isDirectory(path)) {
        return path;
      } else {
        return path.getParent();
      }

    } catch (IOException e) {
      throw new DatasetIOException("Cannot access path: " + path, e);
    }
  }
662803
public synchronized com.sun.tools.javac.util.List<String> getFiles(RelativeDirectory path) {
        try {
            checkIndex();

            DirectoryEntry de = directories.get(path);
            com.sun.tools.javac.util.List<String> ret = de == null ? null : de.getFiles();

            if (ret == null) {
                return com.sun.tools.javac.util.List.<String>nil();
            }
            return ret;
        }
        catch (IOException e) {
            return com.sun.tools.javac.util.List.<String>nil();
        }
    }
826106
@Override
	public String getFilePath(String resourcePath) {

		String filePath = null;
		List<ResourceBrowser> list = new ArrayList<>();
		list.addAll(resourceInfoProviders);
		for (Iterator<ResourceBrowser> iterator = list.iterator(); iterator.hasNext() && filePath == null;) {
			ResourceBrowser rsBrowser = iterator.next();
			if (generatorRegistry.isPathGenerated(resourcePath)) {
				if (rsBrowser instanceof ResourceGenerator) {
					ResourceGenerator rsGeneratorBrowser = (ResourceGenerator) rsBrowser;
					if (rsGeneratorBrowser.getResolver().matchPath(resourcePath)) {
						filePath = rsBrowser.getFilePath(resourcePath);
					}
				}
			} else {
				if (!(rsBrowser instanceof ResourceGenerator)) {
					filePath = rsBrowser.getFilePath(resourcePath);
				}
			}
		}
		return filePath;
	}
905077
public File getFile(String relativePath) throws IOException {
        if (!open.get()) {
            throw VFSMessages.MESSAGES.tempDirectoryClosed();
        }
        return new File(root, relativePath);
    }
136599
private Collection<String> getFileDirectory(String path)
            throws Exception {

        // If the crawler is being closed, we return
        if (closed) {
            return Collections.emptyList();
        }

        logger.trace("Querying elasticsearch for files in dir [{}:{}]", PATH_ROOT, SignTool.sign(path));
        Collection<String> files = new ArrayList<>();
        ESSearchResponse response = esClient.search(
                new ESSearchRequest()
                        .withIndex(fsSettings.getElasticsearch().getIndex())
                        .withSize(REQUEST_SIZE)
                        .addField(FILE_FILENAME)
                        .withESQuery(new ESTermQuery(PATH_ROOT, SignTool.sign(path))));

        logger.trace("Response [{}]", response.toString());
        if (response.getHits() != null) {
            for (ESSearchHit hit : response.getHits()) {
                String name;
                if (hit.getFields() != null
                        && hit.getFields().get(FILE_FILENAME) != null) {
                    // In case someone disabled _source which is not recommended
                    name = hit.getFields().get(FILE_FILENAME).getValue();
                } else {
                    // Houston, we have a problem ! We can't get the old files from ES
                    logger.warn("Can't find stored field name to check existing filenames in path [{}]. " +
                            "Please set store: true on field [{}]", path, FILE_FILENAME);
                    throw new RuntimeException("Mapping is incorrect: please set stored: true on field [" +
                            FILE_FILENAME + "].");
                }
                files.add(name);
            }
        }

        logger.trace("We found: {}", files);

        return files;
    }
865074
def GetFileEntryByPathSpec(self, path_spec):
    
    location = getattr(path_spec, 'location', None)

    if (location is None or
        not location.startswith(self.LOCATION_ROOT)):
      return None

    if len(location) == 1:
      return cpio_file_entry.CPIOFileEntry(
          self._resolver_context, self, path_spec, is_root=True,
          is_virtual=True)

    cpio_archive_file_entry = self._cpio_archive_file.GetFileEntryByPath(
        location[1:])
    if cpio_archive_file_entry is None:
      return None

    return cpio_file_entry.CPIOFileEntry(
        self._resolver_context, self, path_spec,
        cpio_archive_file_entry=cpio_archive_file_entry)
915082
public static Resource getFileResource(String filePath) {
        String path;

        if (filePath.contains(FILE_PATH_CHARSET_PARAMETER)) {
            path = filePath.substring(0, filePath.indexOf(FileUtils.FILE_PATH_CHARSET_PARAMETER));
        } else {
            path = filePath;
        }

        if (path.startsWith(ResourceUtils.FILE_URL_PREFIX)) {
            return new FileSystemResource(path.substring(ResourceUtils.FILE_URL_PREFIX.length() - 1));
        } else if (path.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
            return new PathMatchingResourcePatternResolver().getResource(path);
        }

        Resource file = new FileSystemResource(path);
        if (!file.exists()) {
            return  new PathMatchingResourcePatternResolver().getResource(path);
        }

        return file;
    }
855783
@Override
  public FileStatus getFileStatus(Path hadoopPath)
      throws IOException {

    long startTime = System.nanoTime();
    Preconditions.checkArgument(hadoopPath != null, "hadoopPath must not be null");

    checkOpen();

    logger.atFine().log("GHFS.getFileStatus: %s", hadoopPath);
    URI gcsPath = getGcsPath(hadoopPath);
    FileInfo fileInfo = getGcsFs().getFileInfo(gcsPath);
    if (!fileInfo.exists()) {
      logger.atFine().log("GHFS.getFileStatus: not found: %s", gcsPath);
      throw new FileNotFoundException(
          (fileInfo.isDirectory() ? "Directory not found : " : "File not found : ") + hadoopPath);
    }
    String userName = getUgiUserName();
    FileStatus status = getFileStatus(fileInfo, userName);

    long duration = System.nanoTime() - startTime;
    increment(Counter.GET_FILE_STATUS);
    increment(Counter.GET_FILE_STATUS_TIME, duration);
    return status;
  }
1186434
@javax.annotation.Nonnull
  public static File findFile(@javax.annotation.Nonnull final String path) {
    for (final File root : com.simiacryptus.util.lang.CodeUtil.codeRoots) {
      @javax.annotation.Nonnull final File file = new File(root, path);
      if (file.exists()) return file;
    }
    throw new RuntimeException(String.format("Not Found: %s; Project Roots = %s", path, com.simiacryptus.util.lang.CodeUtil.codeRoots));
  }
800443
public static File[] ls(String path) {
		if (path == null) {
			return null;
		}

		path = getAbsolutePath(path);

		File file = file(path);
		if (file.isDirectory()) {
			return file.listFiles();
		}
		throw new IORuntimeException(StrUtil.format("Path [{}] is not directory!", path));
	}
206689
public SftpFile getFile(String path) throws SftpStatusException,
			SshException {
		String absolute = getAbsolutePath(path);
		SftpFile file = new SftpFile(absolute, getAttributes(absolute));
		file.sftp = this;
		return file;
	}
477529
private Path keyStoreFile()
  {
    String fileName = _config.get(_prefix + ".ssl.key-store");
    
    if (fileName == null) {
      return null;
    }
    
    return Vfs.path(fileName);
  }
618897
private File getTargetDir( File path)
    {
    return
      path == null?
      targetDir_ :

      path.isAbsolute()?
      path :

      new File( targetDir_, path.getPath());
    }
315170
public static List<Path> getFileStorePathList() {
		return getFileStoreList().stream().map(Object::toString)
				.map(toString -> toString.substring(0,
						toString.indexOf(JMString.SPACE)))
				.map(JMPath::getPath).collect(toList());
	}
152611
public File getBackupFile(String path) {

		String rootDir = tempDir + JawrConstant.SPRITE_BACKUP_GENERATED_CSS_DIR;
		String fPath = null;
		if (jawrConfig.isWorkingDirectoryInWebApp()) {
			fPath = jawrConfig.getContext().getRealPath(rootDir + getCssPath(path));
		} else {
			fPath = rootDir + getCssPath(path);
		}

		return new File(fPath);
	}
269878
private static String getPath(final Object classpath) {
        final Object container = ReflectionUtils.getFieldVal(classpath, "container", false);
        if (container == null) {
            return "";
        }

        final Object delegate = ReflectionUtils.getFieldVal(container, "delegate", false);
        if (delegate == null) {
            return "";
        }

        final String path = (String) ReflectionUtils.getFieldVal(delegate, "path", false);
        if (path != null && path.length() > 0) {
            return path;
        }

        final Object base = ReflectionUtils.getFieldVal(delegate, "base", false);
        if (base == null) {
            // giving up.
            return "";
        }

        final Object archiveFile = ReflectionUtils.getFieldVal(base, "archiveFile", false);
        if (archiveFile != null) {
            final File file = (File) archiveFile;
            return file.getAbsolutePath();
        }
        return "";
    }