Package org.gradle.internal.nativeintegration.filesystem

Examples of org.gradle.internal.nativeintegration.filesystem.FileException


public class Jdk7FileCanonicalizer implements FileCanonicalizer {
    public File canonicalize(File file) throws FileException {
        try {
            return file.toPath().toRealPath().toFile();
        } catch (IOException e) {
            throw new FileException(String.format("Could not canonicalize file %s.", file), e);
        }
    }
View Full Code Here


class FallbackFileCanonicalizer implements FileCanonicalizer {
    public File canonicalize(File file) throws FileException {
        try {
            return file.getCanonicalFile();
        } catch (IOException e) {
            throw new FileException(String.format("Could not canonicalize file %s.", file), e);
        }
    }
View Full Code Here

    public void createSymbolicLink(File link, File target) {
        try {
            symlink.symlink(link, target);
        } catch (Exception e) {
            throw new FileException(String.format("Could not create symlink from '%s' to '%s'.", link.getPath(), target.getPath()), e);
        }
    }
View Full Code Here

    public int getUnixMode(File f) {
        try {
            return stat.getUnixMode(f);
        } catch (Exception e) {
            throw new FileException(String.format("Could not get file mode for '%s'.", f), e);
        }
    }
View Full Code Here

    public void chmod(File f, int mode) {
        try {
            chmod.chmod(f, mode);
        } catch (Exception e) {
            throw new FileException(String.format("Could not set file mode %o on '%s'.", mode, f), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.gradle.internal.nativeintegration.filesystem.FileException

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.