@Component public class FileCommands extends ShellCommands
session_| Constructor and Description |
|---|
FileCommands() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
available() |
void |
cat(java.lang.String path) |
void |
cd(java.lang.String path) |
void |
ls(java.lang.String path) |
void |
mkdir(java.lang.String path) |
void |
pwd() |
afterReturningInvocation, afterThrowingInvocation, beforeInvocation, getCmdJsonOptionspublic FileCommands()
throws java.io.IOException
java.io.IOException@CliAvailabilityIndicator(value={"ls","pwd","cd","cat"})
public boolean available()
@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
java.lang.Exception@CliCommand(value="pwd",
help="Print the absolute path of the current working directory.")
public void pwd()
throws java.io.IOException
java.io.IOException@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
java.io.IOException@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
java.io.IOException@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
java.io.IOException