<div> JavaScript is disabled on your browser.
Skip navigation links
Java™ Platform
Standard Ed. 8
compact1

Package java.nio.file.attribute

提供对文件和文件系统属性的访问的接口和类。

See: 描述

Package java.nio.file.attribute Description

提供对文件和文件系统属性的访问的接口和类。
Attribute views 描述
AttributeView Can read or update non-opaque values associated with objects in a file system
  FileAttributeView Can read or update file attributes
    BasicFileAttributeView   Can read or update a basic set of file attributes
      PosixFileAttributeView   Can read or update POSIX defined file attributes
      DosFileAttributeView   Can read or update FAT file attributes
    FileOwnerAttributeView   Can read or update the owner of a file
     AclFileAttributeView   Can read or update Access Control Lists
    UserDefinedFileAttributeView   Can read or update user-defined file attributes
  FileStoreAttributeView Can read or update file system attributes

属性视图提供了非不透明值,只读或可更新的视图或元数据与文件系统中的对象相关联的。的FileAttributeView接口由其他几个界面,视图文件属性的具体设置扩展。FileAttributeViews援引Files.getFileAttributeView(java.nio.file.Path, java.lang.Class<V>, java.nio.file.LinkOption...)方法用以确定所需的视图类型标记选择。视图也可以通过名称来标识。的FileStoreAttributeView接口提供了访问文件存储属性。一个FileStoreAttributeView给定类型是通过调用FileStore.getFileStoreAttributeView(java.lang.Class<V>)方法得到的。

BasicFileAttributeView类定义了读取和更新,许多文件系统文件属性的基本设置方法。

PosixFileAttributeView接口定义的方法来访问文件属性的文件系统和操作系统,实现了可移植的操作系统接口常用的扩展BasicFileAttributeView(POSIX)系列标准。

DosFileAttributeView类扩展BasicFileAttributeView定义方法来访问遗留下来的“DOS”属性的文件支持的文件系统如文件分配表(FAT),消费者常用的设备。

AclFileAttributeView类定义的读写访问控制列表(ACL)文件属性的方法。该文件属性查看使用ACL模型是基于定义的 RFC 3530: Network File System (NFS) version 4 Protocol模型。

除了属性视图外,这个软件包还定义了访问属性时使用的类和接口:

除非另有说明,通过null实参构造函数或方法的任何类或接口在这个包会导致NullPointerException被。

从以下版本开始:
1.7
Skip navigation links
Java™ Platform
Standard Ed. 8

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.

本帮助文档是使用 《百度翻译》翻译,请与英文版配合使用 by--QQ:654638585