Class Stat


@LimitedPrivate({"HDFS","MapReduce"}) @Evolving public class Stat extends Shell
Wrapper for the Unix stat(1) command. Used to workaround the lack of lstat(2) in Java 6.
  • Constructor Details

  • Method Details

    • getFileStatus

      public FileStatus getFileStatus() throws IOException
      Throws:
      IOException
    • isAvailable

      public static boolean isAvailable()
      Whether Stat is supported on the current platform.
      Returns:
      if is available true, not false.
    • getExecString

      protected String[] getExecString()
      Description copied from class: Shell
      return an array containing the command name and its parameters.
      Specified by:
      getExecString in class Shell
      Returns:
      exec string array.
    • parseExecResult

      protected void parseExecResult(BufferedReader lines) throws IOException
      Description copied from class: Shell
      Parse the execution result.
      Specified by:
      parseExecResult in class Shell
      Parameters:
      lines - lines.
      Throws:
      IOException - raised on errors performing I/O.