Class TouchCommands.Touch

All Implemented Interfaces:
Configurable
Enclosing class:
TouchCommands

public static class TouchCommands.Touch extends TouchCommands
A UNIX like touch command.
  • Field Details

  • Constructor Details

    • Touch

      public Touch()
  • Method Details

    • getDateFormat

      @Private @VisibleForTesting public DateFormat getDateFormat()
    • processOptions

      protected void processOptions(LinkedList<String> args)
      Description copied from class: Command
      Must be implemented by commands to process the command line flags and check the bounds of the remaining arguments. If an IllegalArgumentException is thrown, the FsShell object will print the short usage of the command.
      Overrides:
      processOptions in class Command
      Parameters:
      args - the command line arguments
    • processPath

      protected void processPath(PathData item) throws IOException
      Description copied from class: Command
      Hook for commands to implement an operation to be applied on each path for the command. Note implementation of this method is optional if earlier methods in the chain handle the operation.
      Overrides:
      processPath in class Command
      Parameters:
      item - a PathData object
      Throws:
      IOException - if anything else goes wrong in the user-implementation
    • processNonexistentPath

      protected void processNonexistentPath(PathData item) throws IOException
      Description copied from class: Command
      Provides a hook for handling paths that don't exist. By default it will throw an exception. Primarily overriden by commands that create paths such as mkdir or touch.
      Overrides:
      processNonexistentPath in class Command
      Parameters:
      item - the PathData that doesn't exist
      Throws:
      FileNotFoundException - if arg is a path and it doesn't exist
      IOException - if anything else goes wrong...