Package org.jnode.shell.syntax

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


   
    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

    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

    /**
     * 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

    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

    private boolean serial;
   
    public PasteCommand() {
        super(help_super);
        int filesFlags = Argument.MULTIPLE | Argument.EXISTING | FileArgument.HYPHEN_IS_SPECIAL;
        argFiles = new FileArgument("files", filesFlags, help_files);
        argSerial = new FlagArgument("serial", 0, help_serial);
        argDelims = new StringArgument("delims", 0, help_delims);
        registerArguments(argFiles, argSerial, argDelims);
    }
View Full Code Here

   
    private final FileArgument argDir;

    public MkdirCommand() {
        super(help_super);
        argDir = new FileArgument("directory", Argument.MANDATORY | Argument.NONEXISTENT, help_dir);
        registerArguments(argDir);
    }
View Full Code Here

TOP

Related Classes of org.jnode.shell.syntax.FileArgument

Copyright © 2018 www.massapicom. 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.