Examples of FileArgument


Examples of org.jnode.shell.syntax.FileArgument

    public BZip(String s) {
        super(s);
        Compress   = new FlagArgument("compress", Argument.OPTIONAL, help_compress);
        Decompress = new FlagArgument("decompress", Argument.OPTIONAL, help_decompress);
        int flags = Argument.OPTIONAL | Argument.MULTIPLE | Argument.EXISTING | FileArgument.HYPHEN_IS_SPECIAL;
        Files      = new FileArgument("files", flags, help_files);
        Keep       = new FlagArgument("keep", Argument.OPTIONAL, help_keep);
        Small      = new FlagArgument("small", Argument.OPTIONAL, help_small);
        Test       = new FlagArgument("test", Argument.OPTIONAL, help_test);
        createStreamBuffer(4096);
    }
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

    public TftpCommand() {
        super(help_super);
        argPut    = new FlagArgument("put", Argument.OPTIONAL, help_put);
        argGet    = new FlagArgument("get", Argument.OPTIONAL, help_get);
        argServer = new HostNameArgument("host", Argument.OPTIONAL, help_host);
        argFile   = new FileArgument("filename", Argument.OPTIONAL, help_file);
        registerArguments(argGet, argPut, argFile, argServer);
    }
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

    private final FileArgument file2Arg;

    public CmpCommand() {
        super(HELP_SUPER);

        file1Arg = new FileArgument("file1", Argument.MANDATORY | Argument.EXISTING, HELP_FILE);
        file2Arg = new FileArgument("file2", Argument.MANDATORY | Argument.EXISTING, HELP_FILE);

        registerArguments(file1Arg, file2Arg);
    }
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

        argByteRange  = new NumberListArgument("byte-range", 0, 1, Integer.MAX_VALUE - 1, help_byte);
        argCharRange  = new NumberListArgument("char-range", 0, 1, Integer.MAX_VALUE - 1, help_char);
        argFieldRange = new NumberListArgument("field-range", 0, 1, Integer.MAX_VALUE - 1, help_field);
        argInDelim    = new StringArgument("in-delim", 0, help_in_delim);
        argOutDelim   = new StringArgument("out-delim", 0, help_out_delim);
        argFiles      = new FileArgument("files", 0, help_files);
        argSuppress   = new FlagArgument("suppress", 0, help_suppress);
        argComplement = new FlagArgument("complement", 0, help_complement);
        registerArguments(argByteRange, argCharRange, argFieldRange, argInDelim, argOutDelim, argFiles);
        registerArguments(argSuppress, argComplement);
    }
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

        ModeDir        = new StringArgument("mode-dir", 0, help_mode_dir);
        ModeBinaryText = new FlagArgument("mode-binary-text", 0, help_mode_binary_text);
        ModeBinarySkip = new FlagArgument("mode-binary-skip", 0, help_mode_binary_skip);
        ModeDirRecurse = new FlagArgument("mode-dir-recurse", 0, help_mode_dir_recurse);
        Exclude        = new StringArgument("pattern-exclude", 0, help_exclude);
        ExcludeFile    = new FileArgument("pattern-exclude-file", Argument.EXISTING, help_exclude_file);
        ExcludeDir     = new StringArgument("pattern-exclude-dir", 0, help_exclude_dir);
        Include        = new StringArgument("pattern-include", 0, help_include);
        registerArguments(ModeBinary, ModeBinaryText, ModeBinarySkip, ModeDevice, ModeDir, ModeDirRecurse);
        registerArguments(Exclude, ExcludeFile, ExcludeDir, Include);
       
        NullTerm = new FlagArgument("null-term", 0, help_null_term);
        Patterns = new StringArgument("patterns", Argument.MULTIPLE | Argument.MANDATORY, help_patterns);
        PatternFiles = new FileArgument("pattern-files", Argument.MULTIPLE | Argument.EXISTING, help_pattern_files);
        Files = new
            FileArgument("files", Argument.MULTIPLE | Argument.EXISTING | FileArgument.HYPHEN_IS_SPECIAL, help_files);
        registerArguments(Patterns, PatternFiles, Files, NullTerm);
       
        // Default matcher
        match = Pattern.compile(".*").matcher("");
 
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

    private PrintWriter err;
    private byte[] buffer = new byte[1024 * 8];

    public CpCommand() {
        super(HELP_SUPER);
        argSource = new FileArgument("source", Argument.MANDATORY | Argument.MULTIPLE | Argument.EXISTING, HELP_SOURCE);
        argTarget      = new FileArgument("target", Argument.MANDATORY, HELP_TARGET);
        argForce       = new FlagArgument("force", Argument.OPTIONAL, HELP_FORCE);
        argInteractive = new FlagArgument("interactive", Argument.OPTIONAL, HELP_INTERACTIVE);
        argUpdate      = new FlagArgument("update", Argument.OPTIONAL, HELP_UPDATE);
        argRecursive   = new FlagArgument("recursive", Argument.OPTIONAL, HELP_RECURSE);
        argVerbose     = new FlagArgument("verbose", Argument.OPTIONAL, HELP_VERBOSE);
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

   
    private final FileArgument argDir;

    public CdCommand() {
        super(HELP_SUPER);
        argDir = new FileArgument("directory", Argument.OPTIONAL | Argument.EXISTING, HELP_DIR);
        registerArguments(argDir);
    }
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

    private MessageDigest digestEngine;
   
   
    public Md5SumCommand() {
        super(help_super);
        argPaths      = new FileArgument("paths", Argument.MULTIPLE | Argument.EXISTING, help_paths);
        flagRecursive = new FlagArgument("recursive", Argument.OPTIONAL, help_recurse);
        argCheckfile  = new FileArgument("checkfile", Argument.SINGLE | Argument.EXISTING, help_check);
        registerArguments(argPaths, flagRecursive, argCheckfile);
    }
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

    /**
     * Instantiates a new word count command.
     */
    public WcCommand() {
        super(STR_SUPER);
        filesArgs = new FileArgument("files", Argument.OPTIONAL | Argument.EXISTING | Argument.MULTIPLE);
        bytesArgs = new FlagArgument("bytes", Argument.OPTIONAL, HELP_BYTES);
        linesArgs = new FlagArgument("lines", Argument.OPTIONAL, HELP_LINES);
        charsArgs = new FlagArgument("chars", Argument.OPTIONAL, HELP_CHARS);
        wordsArgs = new FlagArgument("worlds", Argument.OPTIONAL, HELP_WORDS);
        maxChars  = new FlagArgument("maxCharLine", Argument.OPTIONAL, HELP_MAX_CHARS);
View Full Code Here

Examples of org.jnode.shell.syntax.FileArgument

    private boolean reverse;
    private boolean first = true;
   
    public HeadCommand() {
        super("Print the head of a list of files, or stdin");
        Files   = new FileArgument("files", Argument.MULTIPLE | Argument.OPTIONAL, help_files);
        Lines   = new StringArgument("lines", Argument.OPTIONAL | Argument.EXISTING, help_lines);
        Bytes   = new StringArgument("bytes", Argument.OPTIONAL | Argument.EXISTING, help_bytes);
        Quiet   = new FlagArgument("quiet", Argument.OPTIONAL, help_quiet);
        Verbose = new FlagArgument("verbose", Argument.OPTIONAL, help_verbose);
        registerArguments(Files, Lines, Bytes, Quiet, Verbose);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.