NIO2 API

org.classpath.icedtea.java.nio.file.attribute
Interface FileStoreSpaceAttributeView

All Superinterfaces:
AttributeView, FileStoreAttributeView

public interface FileStoreSpaceAttributeView
extends FileStoreAttributeView

A file store attribute view that supports reading of space attributes.

Where dynamic access to file attributes is required, the attributes supported by this attribute view have the following names and types:

Name Type
"totalSpace" Long
"usableSpace" Long
"unallocatedSpace" Long

The getAttribute or readAttributes(String,String[]) methods may be used to read any of these attributes as if by invoking the readAttributes() method.

Since:
1.7

Method Summary
 java.lang.String name()
          Returns the name of the attribute view.
 FileStoreSpaceAttributes readAttributes()
          Reads the disk space attributes as a bulk operation.
 
Methods inherited from interface org.classpath.icedtea.java.nio.file.attribute.AttributeView
getAttribute, readAttributes, setAttribute
 

Method Detail

name

java.lang.String name()
Returns the name of the attribute view. Attribute views of this type have the name "space".

Specified by:
name in interface AttributeView

readAttributes

FileStoreSpaceAttributes readAttributes()
                                        throws java.io.IOException
Reads the disk space attributes as a bulk operation.

It is file system specific if all attributes are read as an atomic operation with respect to other file system operations.

Returns:
The disk space attributes
Throws:
java.io.IOException - If an I/O error occurs
java.lang.SecurityException - In the case of the default provider, and a security manager is installed, its checkRead method is invoked to check read access to the file used to obtain access to the file system, and in addition it checks RuntimePermission ("getFileStoreAttributes")

NIO2 API

Submit a bug or feature

Copyright 2010 Sun Microsystems, Inc. All rights reserved. Use is subject to the terms of the GNU General Public License.