PathPermissions Class
- java.
lang. Object - com.
azure. storage. file. datalake. models. PathPermissions
- com.
public class PathPermissions
Represents POSIX-style permissions on a given resource. Each resource specifies permissions for the owner, the owning group, and everyone else. Permissions for users or groups not included here can be set using an Access Control List. Manipulating resource permissions is only supported when ADLS interop and Hierarchical Namespace are enabled.
Constructor Summary
Constructor | Description |
---|---|
PathPermissions() |
Initializes a new instance of |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean | equals(Object o) |
Role |
getGroup()
Returns the RolePermissions for the owning group of the resource. |
Role |
getOther()
Returns the RolePermissions for the other users. |
Role |
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
Path |
parseOctal(String octal)
Converts an octal string into a |
static
Path |
parseSymbolic(String str)
Converts a symbolic representation of the permissions into a |
Path |
setGroup(RolePermissions group)
Sets the permissions for the owning group of the resource. |
Path |
setOther(RolePermissions other)
Sets the permissions for the other users of the resource. |
Path |
setOwner(RolePermissions owner)
Sets the permissions for the owner of the resource. |
Path |
setStickyBit(boolean hasStickyBit)
Sets the value of the sticky bit. |
String |
toString()
Converts this object into its octal representation. |
Methods inherited from java.lang.Object
Constructor Details
PathPermissions
public PathPermissions()
Initializes a new instance of PathPermissions
by setting each member to a new instance of RolePermissions.
Method Details
equals
public boolean equals(Object o)
Overrides:
PathPermissions.equals(Object o)Parameters:
getGroup
public RolePermissions getGroup()
Returns the RolePermissions for the owning group of the resource.
Returns:
getOther
public RolePermissions getOther()
Returns the RolePermissions for the other users.
Returns:
getOwner
public RolePermissions getOwner()
Returns the RolePermissions for the owner of the resource.
Returns:
hashCode
public int hashCode()
Overrides:
PathPermissions.hashCode()isExtendedInfoInAcl
public boolean isExtendedInfoInAcl()
Returns whether or not there is more permissions information in the ACLs. The permissions string only returns information on the owner, owning group, and other, but the ACLs may contain more permissions for specific users or groups.
Returns:
true
if there is more information in the ACL. false
otherwise.isStickyBitSet
public boolean isStickyBitSet()
Returns whether or not the sticky bit has been set. The sticky bit may be set on directories, the files in that directory may only be renamed or deleted by the file's owner, the directory's owner, or the root user.
Returns:
true
if the sticky bit is set and false
otherwise.parseOctal
public static PathPermissions parseOctal(String octal)
Converts an octal string into a 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.
Parameters:
Returns:
PathPermissions
instance.parseSymbolic
public static PathPermissions parseSymbolic(String str)
Converts a symbolic representation of the permissions into a 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 '-'.
Parameters:
Returns:
PathPermissions
instance.setGroup
public PathPermissions setGroup(RolePermissions group)
Sets the permissions for the owning group of the resource.
Parameters:
Returns:
setOther
public PathPermissions setOther(RolePermissions other)
Sets the permissions for the other users of the resource.
Parameters:
Returns:
setOwner
public PathPermissions setOwner(RolePermissions owner)
Sets the permissions for the owner of the resource.
Parameters:
Returns:
setStickyBit
public PathPermissions setStickyBit(boolean hasStickyBit)
Sets the value of the sticky bit. The sticky bit may be set on directories, the files in that directory may only be renamed or deleted by the file's owner, the directory's owner, or the root user.
Parameters:
True
to set the sticky bit and false
to clear it.
Returns:
toString
public String toString()
Converts this object into its octal representation.
Overrides:
PathPermissions.toString()Returns:
String
that represents the permissions in octal.Applies to
Azure SDK for Java