IBasicFileAttributeView 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
文件属性视图,它提供许多文件系统通用的文件属性的基本集<的>视图<>。
[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
- 派生
- 属性
- 实现
注解
文件属性视图,它提供许多文件系统通用的文件属性的基本集<的>视图<>。 基本文件属性集由 接口定义的 em mandatory</em> 和 <em>optional</em> 文件属性组成<。>BasicFileAttributes
通过调用 方法,以批量操作/em 的形式<>从文件系统检索文件#readAttributes() readAttributes
属性。>< 此类还定义 #setTimes setTimes
方法以更新文件的时间属性。
如果需要动态访问文件属性,则此属性视图支持的属性具有以下名称和类型:<blockquote<>table class=“striped”><描述文字 style=“display:none”>Supported attributes</描述文字<>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><th><scope=“row”> “lastAccessTime” </th><tdFileTime
></td></tr<><>th scope=“row”> “creationTime” </th><td<>FileTime
/td></tr<<>>th scope=“row”> “size” </th><td>Long
</td></tr><th><scope=“row”> “isRegularFile” </th><td<Boolean
>/td></tr><tr><th scope=“row”> “isDirectory” </th><td>Boolean
</td<>/tr><><th scope=“row”> “isSymbolicLink” </th><tdBoolean
></td<>/tr><><th scope=“row”> “isOther” </th><td>Boolean
</td></tr><><th scope=“row”> “fileKey” </th<>td>Object
</td<>/tr<>/tbody<>/table></blockquote>
方法 java.nio.file.Files#getAttribute getAttribute
可用于读取这些属性中的任何一个,就像通过调用 方法一 #readAttributes() readAttributes()
样。
方法 java.nio.file.Files#setAttribute setAttribute
可用于更新文件的上次修改时间、上次访问时间或创建时间属性,就像通过调用 #setTimes setTimes
方法一样。
在 1.7 中添加。
的 java.nio.file.attribute.BasicFileAttributeView
Java 文档。
此页面的某些部分是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的条款使用。
属性
Handle |
获取基础 Android 对象的 JNI 值。 (继承自 IJavaObject) |
JniIdentityHashCode |
返回包装实例的 的值 |
JniManagedPeerState |
托管对等方的状态。 (继承自 IJavaPeerable) |
JniPeerMembers |
成员访问和调用支持。 (继承自 IJavaPeerable) |
PeerReference |
返回 JniObjectReference 包装的 Java 对象实例的 。 (继承自 IJavaPeerable) |
方法
Disposed() |
在释放实例时调用。 (继承自 IJavaPeerable) |
DisposeUnlessReferenced() |
如果没有对此实例的未完成引用,则调用 |
Finalized() |
在实例完成时调用。 (继承自 IJavaPeerable) |
Name() |
返回属性视图的名称。 |
ReadAttributes() |
以批量操作的形式读取基本文件属性。 |
SetJniIdentityHashCode(Int32) |
设置 返回 |
SetJniManagedPeerState(JniManagedPeerStates) |
文件属性视图,它提供许多文件系统通用的文件属性的基本集<的>视图<>。 (继承自 IJavaPeerable) |
SetPeerReference(JniObjectReference) |
设置 返回 |
SetTimes(FileTime, FileTime, FileTime) |
汇报文件的任何或所有上次修改时间、上次访问时间和创建时间属性。 |
UnregisterFromRuntime() |
取消注册此实例,以便运行时不会从将来 Java.Interop.JniRuntime+JniValueManager.PeekValue 的调用中返回它。 (继承自 IJavaPeerable) |
扩展方法
JavaCast<TResult>(IJavaObject) |
执行 Android 运行时检查的类型转换。 |
JavaCast<TResult>(IJavaObject) |
文件属性视图,它提供许多文件系统通用的文件属性的基本集<的>视图<>。 |
GetJniTypeName(IJavaPeerable) |
文件属性视图,它提供许多文件系统通用的文件属性的基本集<的>视图<>。 |