Example usage for java.nio.file AccessMode EXECUTE

List of usage examples for java.nio.file AccessMode EXECUTE

Introduction

In this page you can find the example usage for java.nio.file AccessMode EXECUTE.

Prototype

AccessMode EXECUTE

To view the source code for java.nio.file AccessMode EXECUTE.

Click Source Link

Document

Test execute access.

Usage

From source file:com.github.fge.ftpfs.io.commonsnetimpl.CommonsNetFtpAgent.java

private static EnumSet<AccessMode> calculateAccess(final FTPFile file) {
    final EnumSet<AccessMode> ret = EnumSet.noneOf(AccessMode.class);
    if (file.hasPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION))
        ret.add(AccessMode.READ);
    if (file.hasPermission(FTPFile.USER_ACCESS, FTPFile.WRITE_PERMISSION))
        ret.add(AccessMode.WRITE);
    if (file.hasPermission(FTPFile.USER_ACCESS, FTPFile.EXECUTE_PERMISSION))
        ret.add(AccessMode.EXECUTE);
    return ret;/*  ww w . j  a va2  s .  c  o  m*/
}