|
Eclipse Platform Kepler (4.3) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.resources.ResourceAttributes
public class ResourceAttributes
This class represents platform specific attributes of files. Any attributes can be added, but only the attributes that are supported by the platform will be used. These methods do not set the attributes in the file system.
IResource.getResourceAttributes()
,
IResource.setResourceAttributes(ResourceAttributes)
Constructor Summary | |
---|---|
ResourceAttributes()
Creates a new instance of ResourceAttributes . |
Method Summary | |
---|---|
static ResourceAttributes |
fromFile(java.io.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 This attribute is used only on file systems supporting EFS.ATTRIBUTE_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. |
java.lang.String |
toString()
Returns a string representation of the attributes, suitable for debugging purposes only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourceAttributes()
ResourceAttributes
.
Method Detail |
---|
public static ResourceAttributes fromFile(java.io.File file)
file
- The file to get attributes from
public boolean isArchive()
This attribute is used only on file systems supporting EFS.ATTRIBUTE_ARCHIVE
.
true
if this resource is marked archive,
false
otherwisesetArchive(boolean)
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_ARCHIVE
public boolean isExecutable()
This attribute is used only on file systems supporting EFS.ATTRIBUTE_EXECUTABLE
.
true
if this resource is marked executable,
false
otherwisesetExecutable(boolean)
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_EXECUTABLE
public boolean isHidden()
This attribute is used only on file systems supporting EFS.ATTRIBUTE_HIDDEN
.
true
if this resource is marked hidden,
false
otherwisesetHidden(boolean)
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_HIDDEN
public boolean isReadOnly()
This attribute is used only on file systems supporting EFS.ATTRIBUTE_READ_ONLY
.
true
if this resource is marked as read only,
false
otherwisesetReadOnly(boolean)
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_READ_ONLY
public boolean isSymbolicLink()
This attribute is used only on file systems supporting EFS.ATTRIBUTE_SYMLINK
.
true
if this resource is marked as symbolic link,
false
otherwisesetSymbolicLink(boolean)
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_SYMLINK
public void setArchive(boolean archive)
This attribute is used only on file systems supporting EFS.ATTRIBUTE_ARCHIVE
.
archive
- true
to set it to be archive,
false
to unsetisArchive()
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_ARCHIVE
public void set(int mask, boolean value)
public boolean isSet(int mask)
public void setExecutable(boolean executable)
This attribute is used only on file systems supporting EFS.ATTRIBUTE_EXECUTABLE
.
executable
- true
to set it to be executable,
false
to unsetisExecutable()
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_EXECUTABLE
public void setHidden(boolean hidden)
This attribute is used only on file systems supporting EFS.ATTRIBUTE_HIDDEN
.
hidden
- true
to set it to be marked hidden,
false
to unsetisHidden()
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_HIDDEN
public void setReadOnly(boolean readOnly)
This attribute is used only on file systems supporting EFS.ATTRIBUTE_READ_ONLY
.
readOnly
- true
to set it to be marked read only,
false
to unsetisReadOnly()
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_READ_ONLY
public void setSymbolicLink(boolean symLink)
This attribute is used only on file systems supporting EFS.ATTRIBUTE_SYMLINK
.
symLink
- true
to set it to be marked as symbolic link,
false
to unsetisSymbolicLink()
,
IFileSystem.attributes()
,
EFS.ATTRIBUTE_SYMLINK
public java.lang.String toString()
toString
in class java.lang.Object
|
Eclipse Platform Kepler (4.3) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.