/** FileStatus for Oss file systems. */ @Override public FileStatus getFileStatus(Path f) throws IOException { Path absolutePath = makeAbsolute(f); String key = JetOssFileSystemStore.pathToKey(absolutePath); if (key.length() == 0) { // root always exists return new OssFileStatus(f.makeQualified(this), INode.DIRECTORY_INODE); } INode inode = store.retrieveINode(makeAbsolute(f)); if (inode == null) { throw new FileNotFoundException(f + ": No such file or directory."); } return new OssFileStatus(f.makeQualified(this), inode); }
private boolean checkValidity(Path path) { String key = JetOssFileSystemStore.pathToKey(path); return key.length() > 0; }