Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.resources
Class ResourceAttributes


java.lang.Object
  extended by 
org.eclipse.core.resources.ResourceAttributes

public class ResourceAttributes
extends Object

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.

Since:
3.1
See Also:
IResource.getResourceAttributes(), IResource.setResourceAttributes(ResourceAttributes)
Restriction:
This class is not intended to be subclassed by clients.

Constructor Summary
ResourceAttributes ()
          Creates a new instance of ResourceAttributes.
 
Method Summary
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 isSymbolicLink ()
          Returns whether this ResourceAttributes object is marked read only.
 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.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceAttributes

public ResourceAttributes()
Creates a new instance of ResourceAttributes.

Method Detail

fromFile

public static 
ResourceAttributes fromFile(
File file)
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.

Returns:
true if this resource is marked archive, false otherwise
See Also:
setArchive(boolean)

isExecutable

public boolean isExecutable()
Returns whether this ResourceAttributes object is marked executable.

Returns:
true if this resource is marked executable, false otherwise
See Also:
setExecutable(boolean)

isHidden

public boolean isHidden()
Returns whether this ResourceAttributes object is marked hidden.

Returns:
true if this resource is marked hidden, false otherwise
Since:
3.2
See Also:
setHidden(boolean)

isReadOnly

public boolean isReadOnly()
Returns whether this ResourceAttributes object is marked read only.

Returns:
true if this resource is marked as read only, false otherwise
See Also:
setReadOnly(boolean)

isSymbolicLink

public boolean isSymbolicLink()
Returns whether this ResourceAttributes object is marked read only.

Returns:
true if this resource is marked as symbolic link, false otherwise
Since:
3.4
See Also:
setSymbolicLink(boolean)

setArchive

public void setArchive(boolean archive)
Sets or unsets whether this ResourceAttributes object is marked archive.

Parameters:
archive - true to set it to be archive, false to unset
See Also:
isArchive()

setExecutable

public void setExecutable(boolean executable)
Sets or unsets whether this ResourceAttributes object is marked executable.

Parameters:
executable - true to set it to be executable, false to unset
See Also:
isExecutable()

setHidden

public void setHidden(boolean hidden)
Sets or unsets whether this ResourceAttributes object is marked hidden

Parameters:
hidden - true to set it to be marked hidden, false to unset
Since:
3.2
See Also:
isHidden()

setReadOnly

public void setReadOnly(boolean readOnly)
Sets or unsets whether this ResourceAttributes object is marked read only.

Parameters:
readOnly - true to set it to be marked read only, false to unset
See Also:
isReadOnly()

setSymbolicLink

public void setSymbolicLink(boolean symLink)
Sets or unsets whether this ResourceAttributes object is marked as symbolic link.

Parameters:
symLink - true to set it to be marked as symbolic link, false to unset
Since:
3.4
See Also:
isSymbolicLink()

toString

public 
String toString()
Returns a string representation of the attributes, suitable for debugging purposes only.

Overrides:
toString in class Object

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire