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
@Component public class FileCommands extends ShellCommands
-
-
Field Summary
-
Fields inherited from class com.mapr.db.shell.commands.ShellCommands
session_
-
-
Constructor Summary
Constructors Constructor Description FileCommands()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanavailable()voidcat(java.lang.String path)voidcd(java.lang.String path)voidls(java.lang.String path)voidmkdir(java.lang.String path)voidpwd()-
Methods inherited from class com.mapr.db.shell.commands.ShellCommands
afterReturningInvocation, afterThrowingInvocation, beforeInvocation, getCmdJsonOptions
-
-
-
-
Method Detail
-
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") java.lang.String path) throws java.lang.Exception- Throws:
java.lang.Exception
-
pwd
@CliCommand(value="pwd", help="Print the absolute path of the current working directory.") public void pwd() throws java.io.IOException- Throws:
java.io.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") java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException
-
mkdir
@CliCommand(value="mkdir", help="Create a directory at the specified path.") public void mkdir(@CliOption(key={"","path","p"}) java.lang.String path) throws java.io.IOException- Throws:
java.io.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") java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException
-
-