IDosFileAttributes 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
与文件系统中支持旧“DOS”属性的文件关联的文件属性。
[Android.Runtime.Register("java/nio/file/attribute/DosFileAttributes", "", "Java.Nio.FileNio.Attributes.IDosFileAttributesInvoker", ApiSince=26)]
public interface IDosFileAttributes : IDisposable, Java.Interop.IJavaPeerable, Java.Nio.FileNio.Attributes.IBasicFileAttributes
[<Android.Runtime.Register("java/nio/file/attribute/DosFileAttributes", "", "Java.Nio.FileNio.Attributes.IDosFileAttributesInvoker", ApiSince=26)>]
type IDosFileAttributes = interface
interface IBasicFileAttributes
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- 特性
- 实现
注解
与文件系统中支持旧“DOS”属性的文件关联的文件属性。
用法示例:
Path file = ...
DosFileAttributes attrs = Files.readAttributes(file, DosFileAttributes.class);
已在 1.7 中添加。
Java文档java.nio.file.attribute.DosFileAttributes。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
属性
| 名称 | 说明 |
|---|---|
| Handle |
获取基础 Android 对象的 JNI 值。 (继承自 IJavaObject) |
| IsArchive |
获取是否设置了 DOS 存档属性。 |
| IsDirectory |
获取文件是否为目录。 (继承自 IBasicFileAttributes) |
| IsHidden |
获取是否设置了 DOS 隐藏属性。 |
| IsOther |
获取文件既不是常规文件、目录,也不是符号链接。 (继承自 IBasicFileAttributes) |
| IsReadOnly |
获取是否设置 DOS 只读属性。 |
| IsRegularFile |
获取文件是否为常规文件。 (继承自 IBasicFileAttributes) |
| IsSymbolicLink |
获取文件是否为符号链接。 (继承自 IBasicFileAttributes) |
| IsSystem |
获取是否设置 DOS 系统属性。 |
| JniIdentityHashCode |
返回包装实例的值 |
| JniManagedPeerState |
托管对等方的状态。 (继承自 IJavaPeerable) |
| JniObjectReferenceControlBlock |
获取特定于实现的 JNI 引用控制块指针。 (继承自 IJavaPeerable) |
| JniPeerMembers |
成员访问和调用支持。 (继承自 IJavaPeerable) |
| PeerReference |
返回JniObjectReference包装的Java对象实例。 (继承自 IJavaPeerable) |
方法
| 名称 | 说明 |
|---|---|
| CreationTime() |
返回创建时间。 (继承自 IBasicFileAttributes) |
| Disposed() |
在释放实例时调用。 (继承自 IJavaPeerable) |
| DisposeUnlessReferenced() |
如果没有对此实例的未完成引用,则调用 |
| FileKey() |
返回唯一标识给定文件的对象,或者 |
| Finalized() |
在实例完成时调用。 (继承自 IJavaPeerable) |
| LastAccessTime() |
返回上次访问的时间。 (继承自 IBasicFileAttributes) |
| LastModifiedTime() |
返回上次修改的时间。 (继承自 IBasicFileAttributes) |
| SetJniIdentityHashCode(Int32) |
设置由 |
| SetJniManagedPeerState(JniManagedPeerStates) |
设置由 |
| SetPeerReference(JniObjectReference) |
设置由 |
| Size() |
返回文件的大小(以字节为单位)。 (继承自 IBasicFileAttributes) |
| UnregisterFromRuntime() |
取消注册此实例,使运行时不会从将来 Java.Interop.JniRuntime+JniValueManager.PeekValue 的调用中返回它。 (继承自 IJavaPeerable) |
扩展方法
| 名称 | 说明 |
|---|---|
| GetJniTypeName(IJavaPeerable) |
获取实例 |
| JavaAs<TResult>(IJavaPeerable) |
尝试强制 |
| JavaCast<TResult>(IJavaObject) |
执行 Android 运行时检查的类型转换。 |
| JavaCast<TResult>(IJavaObject) |
重复使用兼容的托管对等,或获取请求类型的包装器。 |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
尝试强制 |