public class PathPermissions extends Object
Constructor and Description |
---|
PathPermissions()
Initializes a new instance of
PathPermissions by setting each member to a new instance of
RolePermissions . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
RolePermissions |
getGroup()
Returns the
RolePermissions for the owning group of the resource. |
RolePermissions |
getOther()
Returns the
RolePermissions for the other users. |
RolePermissions |
getOwner()
Returns the
RolePermissions for the owner of the resource. |
int |
hashCode() |
boolean |
isExtendedInfoInAcl()
Returns whether or not there is more permissions information in the ACLs.
|
boolean |
isStickyBitSet()
Returns whether or not the sticky bit has been set.
|
static PathPermissions |
parseOctal(String octal)
Converts an octal string into a
PathPermissions object. |
static PathPermissions |
parseSymbolic(String str)
Converts a symbolic representation of the permissions into a
PathPermissions object. |
PathPermissions |
setGroup(RolePermissions group)
Sets the permissions for the owning group of the resource.
|
PathPermissions |
setOther(RolePermissions other)
Sets the permissions for the other users of the resource.
|
PathPermissions |
setOwner(RolePermissions owner)
Sets the permissions for the owner of the resource.
|
PathPermissions |
setStickyBit(boolean hasStickyBit)
Sets the value of the sticky bit.
|
String |
toString()
Converts this object into its octal representation.
|
public PathPermissions()
PathPermissions
by setting each member to a new instance of
RolePermissions
.public static PathPermissions parseOctal(String octal)
PathPermissions
object.
e.g. 1752
0/1 in the first digit indicates sticky bit. Each subsequent octal character can be expanded into three bits.
In order of MSB to LSB, the bits represent read, write, execute.octal
- The octal representation of the permissions.PathPermissions
instance.IllegalArgumentException
- if the String does not match the format.public static PathPermissions parseSymbolic(String str)
PathPermissions
object.
e.g. rwxr-x-wT
Each set of three characters correspondes to owner, owning group, and other respectively. 'r', 'w', and 'x'
respectively refer to read, write, and execute. A '-' indicates the permission is not given. The sticky bit, if
set, takes the place of the last execute bit; a 't' takes the place of 'x' and a 'T' takes the place of '-'.str
- The symbolic representation of the permissions.PathPermissions
instance.IllegalArgumentException
- if the String does not match the format.public String toString()
public RolePermissions getOwner()
RolePermissions
for the owner of the resource.RolePermissions
for the owner of the resource.public RolePermissions getGroup()
RolePermissions
for the owning group of the resource.RolePermissions
for the owning group of the resource.public RolePermissions getOther()
RolePermissions
for the other users.RolePermissions
for the other users.public PathPermissions setOwner(RolePermissions owner)
owner
- The RolePermissions
that specify what permissions the owner should have.public PathPermissions setGroup(RolePermissions group)
group
- The RolePermissions
that specify what permissions the owning group should have.public PathPermissions setOther(RolePermissions other)
other
- The RolePermissions
that specify what permissions other users should have.public boolean isStickyBitSet()
true
if the sticky bit is set and false
otherwise.public PathPermissions setStickyBit(boolean hasStickyBit)
hasStickyBit
- True
to set the sticky bit and false
to clear it.public boolean isExtendedInfoInAcl()
true
if there is more information in the ACL. false
otherwise.Copyright © 2020 Microsoft Corporation. All rights reserved.