public abstract class AbstractCollectInfoCommand extends java.lang.Object implements Command
| Modifier and Type | Field and Description |
|---|---|
protected FileSystemContext |
mFsContext |
protected java.lang.String |
mWorkingDirPath |
| Constructor and Description |
|---|
AbstractCollectInfoCommand(FileSystemContext fsContext)
Creates an instance of
AbstractCollectInfoCommand. |
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
generateOutputFile(java.lang.String workingDirPath,
java.lang.String fileName)
Generates the output file for the command to write printouts to.
|
java.lang.String |
getWorkingDirectory(org.apache.commons.cli.CommandLine cl)
Gets the directory that this command should output to.
|
void |
validateArgs(org.apache.commons.cli.CommandLine cl) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getCommandName, getDescription, getOptions, getSubCommands, getUsage, hasSubCommand, parseAndValidateArgs, runprotected FileSystemContext mFsContext
protected java.lang.String mWorkingDirPath
public AbstractCollectInfoCommand(FileSystemContext fsContext)
AbstractCollectInfoCommand.fsContext - FileSystemContext the context to run inpublic void validateArgs(org.apache.commons.cli.CommandLine cl)
throws InvalidArgumentException
validateArgs in interface CommandInvalidArgumentExceptionpublic java.lang.String getWorkingDirectory(org.apache.commons.cli.CommandLine cl)
cl - the parsed CommandLinepublic java.io.File generateOutputFile(java.lang.String workingDirPath,
java.lang.String fileName)
throws java.io.IOException
workingDirPath - the base directory this command should output tofileName - name of the output filejava.io.IOExceptionCopyright © 2022. All Rights Reserved.