return the filestatus of files in har archive.
The permission returned are that of the archive
index files. The permissions are not persisted
while creating a hadoop archive.
@param f the path in har filesystem
@return filestatus.
@throws IOException
434660
@Override
  public FileStatus getFileStatus(Path f) throws IOException {
    FileStatus archiveStatus = fs.getFileStatus(archiveIndex);
    HarStatus hstatus = getFileHarStatus(f, archiveStatus);
    return new FileStatus(hstatus.isDir()?0:hstatus.getLength(), hstatus.isDir(),
        (int)archiveStatus.getReplication(), archiveStatus.getBlockSize(),
        hstatus.getModificationTime(), hstatus.getAccessTime(),
        new FsPermission(
        hstatus.getPermission()), hstatus.getOwner(),
        hstatus.getGroup(),
            makeRelative(this.uri.getPath(), new Path(hstatus.getName())));
  }
549232
private String fileStatusInIndex(Path harPath) throws IOException {
    // read the index file
    int hashCode = getHarHash(harPath.toString());
    // get the master index to find the pos
    // in the index file
    FSDataInputStream in = fs.open(masterIndex);
    FileStatus masterStat = fs.getFileStatus(masterIndex);
    LineReader lin = new LineReader(in, getConf());
    Text line = new Text();
    long read = lin.readLine(line);
   //ignore the first line. this is the header of the index files
    String[] readStr = null;
    List<Store> stores = new ArrayList<Store>();
    while(read < masterStat.getLen()) {
      int b = lin.readLine(line);
      read += b;
      readStr = line.toString().split(" ");
      int startHash = Integer.parseInt(readStr[0]);
      int endHash  = Integer.parseInt(readStr[1]);
      if (startHash <= hashCode && hashCode <= endHash) {
        stores.add(new Store(Long.parseLong(readStr[2]),
            Long.parseLong(readStr[3]), startHash,
            endHash));
      }
      line.clear();
    }
    try {
      lin.close();
    } catch(IOException io){
      // do nothing just a read.
    }
    FSDataInputStream aIn = fs.open(archiveIndex);
    LineReader aLin;
    String retStr = null;
    // now start reading the real index file
    for (Store s: stores) {
      read = 0;
      aIn.seek(s.begin);
      aLin = new LineReader(aIn, getConf());
      while (read + s.begin < s.end) {
        int tmp = aLin.readLine(line);
        read += tmp;
        String lineFeed = line.toString();
        String[] parsed = lineFeed.split(" ");
        parsed[0] = decodeFileName(parsed[0]);
        if (harPath.compareTo(new Path(parsed[0])) == 0) {
          // bingo!
          retStr = lineFeed;
          break;
        }
        line.clear();
      }
      if (retStr != null)
        break;
    }
    try {
      aIn.close();
    } catch(IOException io) {
      //do nothing
    }
    return retStr;
  }
587296
@Override @Deprecated
  public FileStatus[] getCorruptFiles() throws IOException {
    CorruptFileBlocks corruptFileBlocks = listCorruptFileBlocks("/", null);
    Set<String> filePaths = new HashSet<String>();
    for (String file : corruptFileBlocks.getFiles()) {
      filePaths.add(file);
    }

    List<FileStatus> fileStatuses = new ArrayList<FileStatus>(filePaths.size());
    for (String f: filePaths) {
      FileStatus fs = getFileInfo(f);
      if (fs != null)
        LOG.info("found fs for " + f);
      else
        LOG.info("found no fs for " + f);
      fileStatuses.add(fs);
    }
    return fileStatuses.toArray(new FileStatus[fileStatuses.size()]);
  }
39649
@Override
  public FileStatus getFileStatus(Path f)  throws IOException {
    INode inode = store.retrieveINode(makeAbsolute(f));
    if (inode == null) {
      throw new FileNotFoundException(f + ": No such file or directory.");
    }
    return new S3FileStatus(f.makeQualified(this), inode);
  }
328965
public com.google.api.ads.admanager.axis.v201805.ArchiveStatus getArchiveStatus() {
        return archiveStatus;
    }
516234
public FileStatus getFileStatus(Path f) throws IOException {
    FileStatus fi = dfs.getFileInfo(getPathName(f));
    if (fi != null) {
      fi.makeQualified(this);
      return fi;
    } else {
      throw new FileNotFoundException("File does not exist: " + f);
    }
  }
108948
public FileStatus getNextFile() throws IOException {
    // Check if traversal is done.
    while (!doneTraversal()) {
      // If traversal is not done, check if the stack is not empty.
      while (!stack.isEmpty()) {
        // If the stack is not empty, look at the top node.
        Node node = stack.peek();
        // Check if the top node has an element.
        if (node.hasNext()) {
          FileStatus element = node.next();
          // Is the next element a directory.
          if (!element.isDir()) {
            // It is a file, return it.
            return element;
          }
          // Next element is a directory, push it on to the stack and
          // continue
          try {
            pushNewNode(element);
          } catch (FileNotFoundException e) {
            // Ignore and move to the next element.
          }
          continue;
        } else {
          // Top node has no next element, pop it and continue.
          stack.pop();
          continue;
        }
      }
      // If the stack is empty, do we have more paths?
      while (!paths.isEmpty()) {
        FileStatus next = paths.remove(0);
        pathIdx++;
        if (!next.isDir()) {
          return next;
        }
        try {
          pushNewNode(next);
        } catch (FileNotFoundException e) {
          continue;
        }
        break;
      }
    }
    return null;
  }
1011663
public DiskStatus getNSDiskStatus() throws IOException {
    long rawNums[] = namenode.getStats();
    // rawNums[6] should be capacityNamespaceUsed
    long dfsUsed = (rawNums.length > 6)? rawNums[6]: rawNums[1];
    return new DiskStatus(rawNums[0], dfsUsed, rawNums[2]);
  }
608808
private FileStatus[] getFileStatusList(final String pathString)
      throws HadoopSecurityManagerException, IOException {
    ensureHdfs();

    final Path path = new Path(pathString);
    FileStatus pathStatus = null;
    try {
      pathStatus = this.hdfs.getFileStatus(path);
    } catch (final IOException e) {
      cleanUp();
    }

    if (pathStatus != null && pathStatus.isDir()) {
      return this.hdfs.listStatus(path);
    }

    return new FileStatus[0];
  }
68820
def getFilesystemStats(self, fs):
        
        if self._mapFSpathDev is None:
            self._initFilesystemInfo()
        return self._diskStats.get(self._mapFSpathDev.get(fs))
148366
public File getFileUnchecked(String fileName) {
    validatePathname(fileName);

    return new File(storageDir + separator + fileName);
  }
1171544
public void reportErrorOnFile(File f) {
    // We use getAbsolutePath here instead of getCanonicalPath since we know
    // that there is some IO problem on that drive.
    // getCanonicalPath may need to call stat() or readlink() and it's likely
    // those calls would fail due to the same underlying IO problem.
    String absPath = f.getAbsolutePath();
    for (StorageDirectory sd : storageDirs) {
      String dirPath = sd.getRoot().getAbsolutePath();
      if (!dirPath.endsWith("/")) {
        dirPath += "/";
      }
      if (absPath.startsWith(dirPath)) {
        reportErrorsOnDirectory(sd, null);
        return;
      }
    }
    
  }
1241015
public static RaidInfo getFileRaidInfo(final FileStatus stat, 
      Configuration conf, boolean skipHarChecking)
    throws IOException {
    // now look for the parity file
    ParityFilePair ppair = null;
    for (Codec c : Codec.getCodecs()) {
      ppair = ParityFilePair.getParityFile(c, stat, conf, skipHarChecking);
      if (ppair != null) {
        return new RaidInfo(c, ppair, c.parityLength);
      }
    }
    return new RaidInfo(null, ppair, 0);
  }
1075539
public int getNumberOfFiles() throws IOException {
      DistributedFileSystem dfs = (DistributedFileSystem)fs;
      RemoteIterator<LocatedFileStatus> iter = dfs.listLocatedStatus(outputPath);
      int fn = 0;
      while (iter.hasNext()) {
        LocatedFileStatus lfs = iter.next();
        if (lfs.isDir()) 
          continue;
        if (lfs.getBlockLocations().length != 1) 
          continue;
        String curHost = rtc.cur_datanode;
        for (String host: lfs.getBlockLocations()[0].getHosts()) {
          if (curHost.equals(host)){
            fn++;
            break;
          }
        }
      }
      LOG.info(" Found " + fn + " files in " + dfs.getUri());
      return fn;
    }
581372
HdfsFileStatus getHdfsFileInfo(String src) {
    String srcs = normalizePath(src);
    byte[][] components = INodeDirectory.getPathComponents(srcs);
    readLock();
    try {
      INode targetNode = rootDir.getNode(components);
      if (targetNode == null) {
        return null;
      }
      else {
        return createHdfsFileStatus(HdfsFileStatus.EMPTY_NAME, targetNode);
      }
    } finally {
      readUnlock();
    }
  }
711865
public boolean containsFile(File f) {
		return unchangedFiles.contains(f) || newFiles.contains(f)
				|| updatedFiles.contains(f) || deletedFiles.contains(f)
				|| recursedDirectories.contains(f)
				|| failedTransfers.containsKey(f);
	}
1352023
public static FileStatus getSplitFileStatus(Path rootPath, String table, String split, long size, int blockSize) {
        return new FileStatus(size, false, 1, blockSize, -1, -1, FILE_PERMISSION, null, null,
                getSplitPath(rootPath, table, split));
    }