Package com.mapr.db.shell.commands
Class FileCommands
java.lang.Object
com.mapr.db.shell.commands.ShellCommands
com.mapr.db.shell.commands.FileCommands
- All Implemented Interfaces:
org.springframework.shell.core.CommandMarker,org.springframework.shell.core.ExecutionProcessor
-
Field Summary
Fields inherited from class com.mapr.db.shell.commands.ShellCommands
session_ -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.mapr.db.shell.commands.ShellCommands
afterReturningInvocation, afterThrowingInvocation, beforeInvocation, getCmdJsonOptions
-
Constructor Details
-
FileCommands
- Throws:
IOException
-
-
Method Details
-
available
@CliAvailabilityIndicator({"ls","pwd","cd","cat"}) public boolean available() -
ls
@CliCommand(value="ls", help="Lists files and folders.") public void ls(@CliOption(key={"","path","p"},help="Path") String path) throws Exception - Throws:
Exception
-
pwd
@CliCommand(value="pwd", help="Print the absolute path of the current working directory.") public void pwd() throws IOException- Throws:
IOException
-
cd
@CliCommand(value="cd", help="Change the current directory to the specified path.") public void cd(@CliOption(key={"","path","p"},specifiedDefaultValue="User\'s home directory") String path) throws IOException - Throws:
IOException
-
mkdir
@CliCommand(value="mkdir", help="Create a directory at the specified path.") public void mkdir(@CliOption(key={"","path","p"}) String path) throws IOException - Throws:
IOException
-
cat
@CliCommand(value="cat", help="Print the content of the specified file on the standard output") public void cat(@CliOption(key={"","path","p"},mandatory=true,specifiedDefaultValue="File to print") String path) throws IOException - Throws:
IOException
-