A command is composed of three elements:
Command
.The basic command syntax is fairly simple:
\
character will escape the following character and be removed from the tokens."
character will escape all characters until the next occurence of "
, except for \
."
characters are not removed from the resulting tokens. It's also possible to include keywords in a command:
$f
is replaced by a file's full path.$n
is replaced by a file's name.$e
is replaced by a file's extension.$N
is replaced by a file's name without its extension.$p
is replaced by a file's parent's path.$j
is replaced by the path of the folder in which the JVM was started. Once a Command
instance has been retrieved, execution tokens can be retrieved through the {@link #getTokens(AbstractFile)} method. This will return a tokenized version of the command and replace anykeyword by the corresponding file value . It's also possible to skip keyword replacement through the {@link #getTokens()} method.
A command's executable tokens are typically meant to be used with {@link com.mucommander.process.ProcessRunner#execute(String[],AbstractFile)}in order to generate instances of {@link com.mucommander.process.AbstractProcess}.
@author Nicolas Rinaudo @see CommandManager @see com.mucommander.process.ProcessRunner @see com.mucommander.process.AbstractProcess
|
|
|
|