|
原帖由 talkfree 于 2010-8-17 18:13 发表
"用户自定义的附加属性" 没有实现吧。
给出NTFS的文件属性给楼主参考一下,要增加一个,VBS应该是做不到的。Java不太熟,估计也不行,有知道的兄弟给指点一下。
NTFS_FILE_FLAG_READONLY ...
我觉得java可以做到的,看下面的java.nio.file.attribute包的介绍,应该可以
Package java.nio.file.attribute(Interfaces and classes providing access to file and file system attributes. )
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
FileStoreSpaceAttributeView Can read file system space usage related attributes
同时FileChannel,FileLock也可以对文件的操作加锁功能,处理并发时候,利用它提供的加锁解锁机制,操作就简单多了。
[ 本帖最后由 JessieSky 于 2010-8-18 08:41 编辑 ] |
|