Class MkdirCommand

  • All Implemented Interfaces:
    alluxio.cli.Command, java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    @PublicApi
    public final class MkdirCommand
    extends AbstractFileSystemCommand
    Creates a new directory specified by the path in args, including any parent folders that are required. This command fails if a directory or file with the same path already exists.
    • Constructor Detail

      • MkdirCommand

        public MkdirCommand​(alluxio.client.file.FileSystemContext fsContext)
        Constructs a new instance to create a new directory.
        Parameters:
        fsContext - the filesystem of Alluxio
    • Method Detail

      • getCommandName

        public java.lang.String getCommandName()
      • run

        public int run​(org.apache.commons.cli.CommandLine cl)
                throws alluxio.exception.AlluxioException,
                       java.io.IOException
        Throws:
        alluxio.exception.AlluxioException
        java.io.IOException
      • getUsage

        public java.lang.String getUsage()
      • getDescription

        public java.lang.String getDescription()
      • validateArgs

        public void validateArgs​(org.apache.commons.cli.CommandLine cl)
                          throws alluxio.exception.status.InvalidArgumentException
        Throws:
        alluxio.exception.status.InvalidArgumentException