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

org.codelibs.elasticsearch.idxproxy.util.FileAccessUtils Maven / Gradle / Ivy

There is a newer version: 5.6.5
Show newest version
package org.codelibs.elasticsearch.idxproxy.util;

import java.nio.file.Path;
import java.security.AccessController;
import java.security.PrivilegedAction;

public final class FileAccessUtils {
    private FileAccessUtils() {
        // nothing
    }

    public static boolean existsFile(final Path p) {
        return AccessController.doPrivileged((PrivilegedAction) () -> {
            return p.toFile().exists();
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy