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