Compartir a través de


IBasicFileAttributeView Interface

Definition

A file attribute view that provides a view of a <em>basic set</em> of file attributes common to many file systems.

[Android.Runtime.Register("java/nio/file/attribute/BasicFileAttributeView", "", "Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker", ApiSince=26)]
public interface IBasicFileAttributeView : IDisposable, Java.Interop.IJavaPeerable, Java.Nio.FileNio.Attributes.IFileAttributeView
[<Android.Runtime.Register("java/nio/file/attribute/BasicFileAttributeView", "", "Java.Nio.FileNio.Attributes.IBasicFileAttributeViewInvoker", ApiSince=26)>]
type IBasicFileAttributeView = interface
    interface IFileAttributeView
    interface IAttributeView
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

A file attribute view that provides a view of a <em>basic set</em> of file attributes common to many file systems. The basic set of file attributes consist of <em>mandatory</em> and <em>optional</em> file attributes as defined by the BasicFileAttributes interface.

The file attributes are retrieved from the file system as a <em>bulk operation</em> by invoking the #readAttributes() readAttributes method. This class also defines the #setTimes setTimes method to update the file's time attributes.

Where dynamic access to file attributes is required, the attributes supported by this attribute view have the following names and types: <blockquote> <table class="striped"> <caption style="display:none">Supported attributes</caption> <thead> <tr> <th scope="col"> Name </th> <th scope="col"> Type </th> </tr> </thead> <tbody> <tr> <th scope="row"> "lastModifiedTime" </th> <td> FileTime</td> </tr> <tr> <th scope="row"> "lastAccessTime" </th> <td> FileTime</td> </tr> <tr> <th scope="row"> "creationTime" </th> <td> FileTime</td> </tr> <tr> <th scope="row"> "size" </th> <td> Long</td> </tr> <tr> <th scope="row"> "isRegularFile" </th> <td> Boolean</td> </tr> <tr> <th scope="row"> "isDirectory" </th> <td> Boolean</td> </tr> <tr> <th scope="row"> "isSymbolicLink" </th> <td> Boolean</td> </tr> <tr> <th scope="row"> "isOther" </th> <td> Boolean</td> </tr> <tr> <th scope="row"> "fileKey" </th> <td> Object</td> </tr> </tbody> </table> </blockquote>

The java.nio.file.Files#getAttribute getAttribute method may be used to read any of these attributes as if by invoking the #readAttributes() readAttributes() method.

The java.nio.file.Files#setAttribute setAttribute method may be used to update the file's last modified time, last access time or create time attributes as if by invoking the #setTimes setTimes method.

Added in 1.7.

Java documentation for java.nio.file.attribute.BasicFileAttributeView.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
Name()

Returns the name of the attribute view.

ReadAttributes()

Reads the basic file attributes as a bulk operation.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
SetTimes(FileTime, FileTime, FileTime)

Updates any or all of the file's last modified time, last access time, and create time attributes.

UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to