Class ResourceAttributes
- Since:
- 3.1
- Author:
- Red Hat Incorporated
- See Also:
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceAttributesCreates a new resource attributes instance with attributes taken from the specified file in the file system.booleanReturns whether this ResourceAttributes object is marked archive.booleanReturns whether this ResourceAttributes object is marked executable.booleanisHidden()Returns whether this ResourceAttributes object is marked hidden.booleanReturns whether this ResourceAttributes object is marked read only.booleanisSet(int mask) Returns whether this ResourceAttributes object has the given mask set.booleanReturns whether this ResourceAttributes object is marked as symbolic link.voidset(int mask, boolean value) Clears all of the bits indicated by the mask.voidsetArchive(boolean archive) Sets or unsets whether this ResourceAttributes object is marked archive.voidsetExecutable(boolean executable) Sets or unsets whether this ResourceAttributes object is marked executable.voidsetHidden(boolean hidden) Sets or unsets whether this ResourceAttributes object is marked hiddenvoidsetReadOnly(boolean readOnly) Sets or unsets whether this ResourceAttributes object is marked read only.voidsetSymbolicLink(boolean symLink) Sets or unsets whether this ResourceAttributes object is marked as symbolic link.toString()Returns a string representation of the attributes, suitable for debugging purposes only.
-
Constructor Details
-
ResourceAttributes
public ResourceAttributes()Creates a new instance ofResourceAttributes.
-
-
Method Details
-
fromFile
Creates a new resource attributes instance with attributes taken from the specified file in the file system. If the specified file does not exist or is not accessible, this method has the same effect as calling the default constructor.- Parameters:
file- The file to get attributes from- Returns:
- A resource attributes object
-
isArchive
public boolean isArchive()Returns whether this ResourceAttributes object is marked archive.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_ARCHIVE.- Returns:
trueif this resource is marked archive,falseotherwise- See Also:
-
isExecutable
public boolean isExecutable()Returns whether this ResourceAttributes object is marked executable.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_EXECUTABLE.- Returns:
trueif this resource is marked executable,falseotherwise- See Also:
-
isHidden
public boolean isHidden()Returns whether this ResourceAttributes object is marked hidden.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_HIDDEN.- Returns:
trueif this resource is marked hidden,falseotherwise- Since:
- 3.2
- See Also:
-
isReadOnly
public boolean isReadOnly()Returns whether this ResourceAttributes object is marked read only.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_READ_ONLY.- Returns:
trueif this resource is marked as read only,falseotherwise- See Also:
-
isSymbolicLink
public boolean isSymbolicLink()Returns whether this ResourceAttributes object is marked as symbolic link.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_SYMLINK.- Returns:
trueif this resource is marked as symbolic link,falseotherwise- Since:
- 3.4
- See Also:
-
setArchive
public void setArchive(boolean archive) Sets or unsets whether this ResourceAttributes object is marked archive.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_ARCHIVE.- Parameters:
archive-trueto set it to be archive,falseto unset- See Also:
-
set
public void set(int mask, boolean value) Clears all of the bits indicated by the mask.- Restriction:
- This method is not intended to be referenced by clients.
- Restriction:
- This method is not intended to be re-implemented or extended by clients.
-
isSet
public boolean isSet(int mask) Returns whether this ResourceAttributes object has the given mask set.- Restriction:
- This method is not intended to be referenced by clients.
- Restriction:
- This method is not intended to be re-implemented or extended by clients.
-
setExecutable
public void setExecutable(boolean executable) Sets or unsets whether this ResourceAttributes object is marked executable.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_EXECUTABLE.- Parameters:
executable-trueto set it to be executable,falseto unset- See Also:
-
setHidden
public void setHidden(boolean hidden) Sets or unsets whether this ResourceAttributes object is marked hiddenThis attribute is used only on file systems supporting
EFS.ATTRIBUTE_HIDDEN.- Parameters:
hidden-trueto set it to be marked hidden,falseto unset- Since:
- 3.2
- See Also:
-
setReadOnly
public void setReadOnly(boolean readOnly) Sets or unsets whether this ResourceAttributes object is marked read only.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_READ_ONLY.- Parameters:
readOnly-trueto set it to be marked read only,falseto unset- See Also:
-
setSymbolicLink
public void setSymbolicLink(boolean symLink) Sets or unsets whether this ResourceAttributes object is marked as symbolic link.This attribute is used only on file systems supporting
EFS.ATTRIBUTE_SYMLINK.- Parameters:
symLink-trueto set it to be marked as symbolic link,falseto unset- Since:
- 3.4
- See Also:
-
toString
Returns a string representation of the attributes, suitable for debugging purposes only.
-