站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

AbstractFileSystem.Attr (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.filesystems
Interface AbstractFileSystem.Attr

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultAttributes, JarFileSystem.Impl, XMLFileSystem.Impl
Enclosing interface:
AbstractFileSystem

public static interface AbstractFileSystem.Attr
extends Serializable

Handle attributes of files.


Field Summary
static long serialVersionUID
          Deprecated. Only public by accident.
 
Method Summary
 Enumeration attributes(String name)
          Get all file attribute names for the file.
 void deleteAttributes(String name)
          Called when a file is deleted, to also delete its attributes.
 Object readAttribute(String name, String attrName)
          Get the file attribute with the specified name.
 void renameAttributes(String oldName, String newName)
          Called when a file is renamed, to appropriately update its attributes.
 void writeAttribute(String name, String attrName, Object value)
          Set the file attribute with the specified name.
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Deprecated. Only public by accident.

See Also:
Constant Field Values
Method Detail

readAttribute

public Object readAttribute(String name,
                            String attrName)
Get the file attribute with the specified name.

Parameters:
name - the file
attrName - name of the attribute
Returns:
appropriate (serializable) value or null if the attribute is unset (or could not be properly restored for some reason)

writeAttribute

public void writeAttribute(String name,
                           String attrName,
                           Object value)
                    throws IOException
Set the file attribute with the specified name.

Parameters:
name - the file
attrName - name of the attribute
value - new value or null to clear the attribute. Must be serializable, although particular filesystems may or may not use serialization to store attribute values.
Throws:
IOException - if the attribute cannot be set. If serialization is used to store it, this may in fact be a subclass such as NotSerializableException.

attributes

public Enumeration attributes(String name)
Get all file attribute names for the file.

Parameters:
name - the file
Returns:
enumeration of keys (as strings)

renameAttributes

public void renameAttributes(String oldName,
                             String newName)
Called when a file is renamed, to appropriately update its attributes.

Parameters:
oldName - old name of the file
newName - new name of the file

deleteAttributes

public void deleteAttributes(String name)
Called when a file is deleted, to also delete its attributes.

Parameters:
name - name of the file


Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.