Udostępnij za pośrednictwem


IDosFileAttributeView Interface

Definition

A file attribute view that provides a view of the legacy "DOS" file attributes.

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

Remarks

A file attribute view that provides a view of the legacy "DOS" file attributes. These attributes are supported by file systems such as the File Allocation Table (FAT) format commonly used in <em>consumer devices</em>.

A DosFileAttributeView is a BasicFileAttributeView that additionally supports access to the set of DOS attribute flags that are used to indicate if the file is read-only, hidden, a system file, or archived.

Where dynamic access to file attributes is required, the attributes supported by this attribute view are as defined by BasicFileAttributeView, and in addition, the following attributes are supported: <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"> readonly </th> <td> Boolean</td> </tr> <tr> <th scope="row"> hidden </th> <td> Boolean</td> </tr> <tr> <th scope="row"> system </th> <td> Boolean</td> </tr> <tr> <th scope="row"> archive </th> <td> Boolean</td> </tr> </tbody> </table> </blockquote>

The java.nio.file.Files#getAttribute getAttribute method may be used to read any of these attributes, or any of the attributes defined by BasicFileAttributeView 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 defined by BasicFileAttributeView. It may also be used to update the DOS attributes as if by invoking the #setReadOnly setReadOnly, #setHidden setHidden, #setSystem setSystem, and #setArchive setArchive methods respectively.

Added in 1.7.

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

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()
SetArchive(Boolean)

Updates the value of the archive attribute.

SetHidden(Boolean)

Updates the value of the hidden attribute.

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)
SetReadOnly(Boolean)

Updates the value of the read-only attribute.

SetSystem(Boolean)

Updates the value of the system attribute.

SetTimes(FileTime, FileTime, FileTime)

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

(Inherited from IBasicFileAttributeView)
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