本文整理汇总了Java中net.sourceforge.argparse4j.inf.Subparser.help方法的典型用法代码示例。如果您正苦于以下问题:Java Subparser.help方法的具体用法?Java Subparser.help怎么用?Java Subparser.help使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sourceforge.argparse4j.inf.Subparser
的用法示例。
在下文中一共展示了Subparser.help方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("search for files or folders by name or tags");
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("path to search in");
target.addArgument("--prefix")
.dest(ARG_PREFIX)
.type(String.class)
.help("select only items with a name beginning with this");
target.addArgument("--suffix")
.dest(ARG_SUFFIX)
.type(String.class)
.help("select only items with a name ending with this");
target.addArgument("--type")
.dest(ARG_TYPE)
.choices(ARG_TYPE_FILE, ARG_TYPE_FOLDER)
.type(String.class)
.help("select only items of this type");
target.addArgument("--depth")
.dest(ARG_DEPTH)
.type(Integer.class)
.help("recurse into subfolders this many times");
}
示例2: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("write or import a file");
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("destination path in the archive");
target.addArgument("source")
.dest(ARG_SOURCE_FILE)
.type(Arguments.fileType().acceptSystemIn().verifyExists().verifyCanRead())
.help("file to import or - for stdin");
target.addArgument("--no-progress")
.dest(ARG_NO_PROGRESS)
.action(Arguments.storeTrue())
.setDefault(false)
.type(Boolean.class)
.help("don't display a progress bar while importing the file");
target.addArgument("-t", "--mediatype")
.dest(ARG_MEDIA_TYPE)
.choices(MediaType.ALL_TYPES)
.type(String.class)
.help("pick a media type");
}
示例3: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("list the contents of a folder");
target.description(
"List the contents of a path in the archive. Use / to list the contents of the root directory. If the " +
"path is a file then the attributes of only that file will be printed. File sizes are formatted as IEC " +
"bytes (powers of 2) unless --machine-readable is used which will show the unformatted number of bytes."
);
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("directory path to list");
target.addArgument("-H", "--no-headings")
.dest(ARG_NOHEADINGS)
.type(Boolean.class)
.action(Arguments.storeTrue())
.help("disable headings in the output");
target.addArgument("-M", "--machine-readable")
.dest(ARG_MACHINEREADABLE)
.type(Boolean.class)
.action(Arguments.storeTrue())
.help("format data in machine readable form");
}
示例4: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("calculate a hash over the contents of a file in the archive");
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("path of the file in the archive");
target.addArgument("-a", "--algorithm")
.dest(ARG_ALGORITHM)
.type(String.class)
.choices("md5", "sha1", "sha224", "sha256")
.setDefault("md5")
.help("the digest algorithm to use");
target.addArgument("--no-progress")
.dest(ARG_NO_PROGRESS)
.action(Arguments.storeTrue())
.setDefault(false)
.type(Boolean.class)
.help("don't display a progress bar while hashing the file");
}
示例5: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("remove a file or directory");
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("path of directory to remove from the archive");
target.addArgument("-r", "--recursive")
.dest(ARG_RECURSIVE)
.type(Boolean.class)
.action(Arguments.storeTrue())
.help("remove all subfolders and files");
target.addArgument("-n", "--no-wipe")
.dest(ARG_NOWIPE)
.type(Boolean.class)
.action(Arguments.storeTrue())
.help("dont wipe deleted files blocks");
target.addArgument("-q", "--no-progress")
.dest(ARG_NOPROGRESS)
.type(Boolean.class)
.action(Arguments.storeTrue())
.help("dont display progress bar if wiping blocks");
}
示例6: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("read or export a file from the archive");
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("source path in the archive");
target.addArgument("destination")
.dest(ARG_DESTINATION_FILE)
.type(Arguments.fileType().acceptSystemIn())
.help("file to export to or - for stdout");
target.addArgument("--ignore-integrity-error")
.dest(ARG_IGNORE_INTEGRITY_CHECK)
.type(Boolean.class)
.action(Arguments.storeTrue())
.help("ignore integrity check error caused by data corruption");
target.addArgument("--no-progress")
.dest(ARG_NO_PROGRESS)
.action(Arguments.storeTrue())
.setDefault(false)
.type(Boolean.class)
.help("don't display a progress bar while importing the file");
}
示例7: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("construct a directory");
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("archive path to create the new directory");
target.addArgument("-r", "--recursive")
.dest(ARG_RECURSIVE)
.type(Boolean.class)
.action(Arguments.storeTrue())
.help("build directories revursively");
}
示例8: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("show the security settings of the archive");
target.addArgument("--audit")
.dest(ARG_AUDIT)
.action(Arguments.storeTrue())
.setDefault(false)
.type(Boolean.class)
.help("Scan the archive for files with out of date security settings");
}
示例9: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("create a new empty archive");
target.addArgument("-o", "--overwrite")
.dest(ARG_OVERWRITE)
.type(Boolean.class)
.action(Arguments.storeTrue())
.help("overwrite the existing file");
}
示例10: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("re-encrypt the given file using the current file security setting");
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("source path in the archive");
target.addArgument("--no-progress")
.dest(ARG_NO_PROGRESS)
.action(Arguments.storeTrue())
.setDefault(false)
.type(Boolean.class)
.help("don't display a progress bar while importing the file");
}
示例11: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("move a file or folder to a different path");
target.addArgument("from-path")
.dest(ARG_FROMPATH)
.type(String.class)
.help("the original path of the item to move");
target.addArgument("to-path")
.dest(ARG_TOPATH)
.type(String.class)
.help("the new path of the item being moved");
}
示例12: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("output the metadata for the file at the given path");
target.description(
"This the metadata associated with the given file. This includes all information except for the " +
"actual file contents. It will contain a representation of the symmetric key, so dont use it in " +
"sensitive contexts."
);
target.addArgument("path")
.dest(ARG_PATH)
.type(String.class)
.help("directory path to list");
}
示例13: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("test a password or password file against the archive");
}
示例14: buildParser
import net.sourceforge.argparse4j.inf.Subparser; //导入方法依赖的package包/类
@Override
public void buildParser(Subparser target)
{
target.help("change the security settings for the archive");
Subparsers securityType = target.addSubparsers().dest(ARG_ARCHIVE_SECURITY);
securityType.addParser(PlaintextDescriptor.IDENTIFIER.toLowerCase());
Subparser p1 = securityType.addParser(PBKDF2Descriptor.IDENTIFIER.toLowerCase());
p1.addArgument("new-password-file")
.dest(ARG_NEW_PASSWORD_FILE)
.type(Arguments.fileType().verifyExists().verifyCanRead().acceptSystemIn())
.help("read the new archive password from the given file or '-' for stdin");
p1.addArgument("--file-security")
.dest(ARG_FILE_SECURITY)
.setDefault(Encryption.AES256_CTR)
.choices(Encryption.AES128_CTR, Encryption.AES256_CTR, Encryption.TWOFISH128_CTR, Encryption.TWOFISH256_CTR)
.type(Encryption.class)
.help("set the encryption used on files");
p1.addArgument("--inventory-security")
.dest(ARG_INV_SECURITY)
.setDefault(Encryption.AES256_CTR)
.choices(Encryption.AES128_CTR, Encryption.AES256_CTR,
Encryption.TWOFISH128_CTR, Encryption.TWOFISH256_CTR)
.type(Encryption.class)
.help("set the encryption used on the hierarchy metadata");
p1.addArgument("--iterations-time")
.dest(ARG_ITERATIONS_TIME)
.setDefault(pbkdf2IterTimeChoices.keySet().iterator().next())
.choices(pbkdf2IterTimeChoices.keySet())
.help("calculate the number of sha operations based on a time limit");
Subparser p2 = securityType.addParser(ScryptDescriptor.IDENTIFIER.toLowerCase());
p2.addArgument(ARG_NEW_PASSWORD_FILE)
.type(Arguments.fileType().verifyExists().verifyCanRead().acceptSystemIn())
.help("read the new archive password from the given file or '-' for stdin");
p2.addArgument("--file-security")
.dest(ARG_FILE_SECURITY)
.setDefault(Encryption.AES256_CTR)
.choices(Encryption.AES128_CTR, Encryption.AES256_CTR, Encryption.TWOFISH128_CTR, Encryption.TWOFISH256_CTR)
.type(Encryption.class)
.help("set the encryption used on files");
p2.addArgument("--inventory-security")
.dest(ARG_INV_SECURITY)
.setDefault(Encryption.AES256_CTR)
.choices(Encryption.AES128_CTR, Encryption.AES256_CTR, Encryption.TWOFISH128_CTR, Encryption.TWOFISH256_CTR)
.type(Encryption.class)
.help("set the encryption used on the hierarchy metadata");
p2.addArgument("--memory-use")
.dest(ARG_MEMORY_USAGE)
.setDefault(scryptNChoices.keySet().iterator().next())
.choices(scryptNChoices.keySet())
.help("set the scrypt N parameter");
}