org.eclipse.core.resources
public class ResourceAttributes extends Object
IResource.getResourceAttributes(),
IResource.setResourceAttributes(ResourceAttributes)| Constructor and Description |
|---|
ResourceAttributes()
Creates a new instance of
ResourceAttributes. |
| Modifier and Type | Method and Description |
|---|---|
static ResourceAttributes |
fromFile(File file)
Creates a new resource attributes instance with attributes
taken from the specified file in the file system.
|
boolean |
isArchive()
Returns whether this ResourceAttributes object is marked archive.
|
boolean |
isExecutable()
Returns whether this ResourceAttributes object is marked executable.
|
boolean |
isHidden()
Returns whether this ResourceAttributes object is marked hidden.
|
boolean |
isReadOnly()
Returns whether this ResourceAttributes object is marked read only.
|
boolean |
isSet(int mask)
Returns whether this ResourceAttributes object has the given mask set.
|
boolean |
isSymbolicLink()
Returns whether this ResourceAttributes object is marked as symbolic link.
|
void |
set(int mask,
boolean value)
Clears all of the bits indicated by the mask.
|
void |
setArchive(boolean archive)
Sets or unsets whether this ResourceAttributes object is marked archive.
|
void |
setExecutable(boolean executable)
Sets or unsets whether this ResourceAttributes object is marked executable.
|
void |
setHidden(boolean hidden)
Sets or unsets whether this ResourceAttributes object is marked hidden
|
void |
setReadOnly(boolean readOnly)
Sets or unsets whether this ResourceAttributes object is marked read only.
|
void |
setSymbolicLink(boolean symLink)
Sets or unsets whether this ResourceAttributes object is marked as symbolic link.
|
String |
toString()
Returns a string representation of the attributes, suitable
for debugging purposes only.
|
public ResourceAttributes()
ResourceAttributes.public static ResourceAttributes fromFile(File file)
file - The file to get attributes frompublic boolean isArchive()
true if this resource is marked archive,
false otherwisesetArchive(boolean)public boolean isExecutable()
true if this resource is marked executable,
false otherwisesetExecutable(boolean)public boolean isHidden()
true if this resource is marked hidden,
false otherwisesetHidden(boolean)public boolean isReadOnly()
true if this resource is marked as read only,
false otherwisesetReadOnly(boolean)public boolean isSymbolicLink()
true if this resource is marked as symbolic link,
false otherwisesetSymbolicLink(boolean)public void setArchive(boolean archive)
archive - true to set it to be archive,
false to unsetisArchive()public void set(int mask,
boolean value)
public boolean isSet(int mask)
public void setExecutable(boolean executable)
executable - true to set it to be executable,
false to unsetisExecutable()public void setHidden(boolean hidden)
hidden - true to set it to be marked hidden,
false to unsetisHidden()public void setReadOnly(boolean readOnly)
readOnly - true to set it to be marked read only,
false to unsetisReadOnly()public void setSymbolicLink(boolean symLink)
symLink - true to set it to be marked as symbolic link,
false to unsetisSymbolicLink()Guidelines for using Eclipse APIs. Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.