public class PosixPermissions extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PosixPermissions.Type
Permission types.
|
| Constructor and Description |
|---|
PosixPermissions(int permissions,
boolean isOwner,
boolean isInGroup)
Creates a new PosixPermissions object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getPermissions()
Gets permissions.
|
boolean |
isExecutable()
Gets whether the permissions are executable.
|
boolean |
isReadable()
Gets whether the permissions are readable.
|
boolean |
isWritable()
Gets whether the permissions are writable.
|
int |
makeExecutable(boolean executable,
boolean ownerOnly)
Creates new permissions based on these permissions.
|
Integer |
makeReadable(boolean readable,
boolean ownerOnly)
Creates new permissions based on these permissions.
|
Integer |
makeWritable(boolean writable,
boolean ownerOnly)
Creates new permissions based on these permissions.
|
public PosixPermissions(int permissions,
boolean isOwner,
boolean isInGroup)
permissions - The permissionsisOwner - true if the user is the owner of the fileisInGroup - true if the user is a group owner of the filepublic int getPermissions()
public boolean isExecutable()
public boolean isReadable()
public boolean isWritable()
public int makeExecutable(boolean executable,
boolean ownerOnly)
executable - Whether the new permissions should be readable.ownerOnly - Whether the new permissions are only for the owner.public Integer makeReadable(boolean readable, boolean ownerOnly)
readable - Whether the new permissions should be readable.ownerOnly - Whether the new permissions are only for the owner.public Integer makeWritable(boolean writable, boolean ownerOnly)
writable - Whether the new permissions should be readable.ownerOnly - Whether the new permissions are only for the owner.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.