All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.permazen.cli.cmd.InputFileParser Maven / Gradle / Ivy

The newest version!

/*
 * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
 */

package io.permazen.cli.cmd;

import java.io.File;

class InputFileParser extends AbstractFileParser {

    @Override
    protected boolean validateFile(File file) {
        return file.exists() && !file.isDirectory() && file.canRead();
    }

    @Override
    protected IllegalArgumentException createParseException(File file) {
        return new IllegalArgumentException(String.format("can't read file \"%s\"", file));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy