java.io.FilePermission

来源:百度文库 编辑:神马文学网 时间:2024/04/27 12:39:16
A FilePermission consistsof a pathnameand a set of actions valid for that pathname.
Pathname is the pathname ofthe file or directory granted the specified actions.
A pathname that ends in "/*" (where "/" is the file separator character, File.separatorChar) indicates all the files and directories contained in that directory.
A pathname that ends with "/-" indicates (recursively) all files and subdirectories contained in that directory.
A pathname consisting of the special token "<>" matches any file.
Note: A pathname consistingof a single "*" indicates all the files in the current directory,while a pathname consisting of a single "-" indicates all the filesin the current directory and (recursively) all files and subdirectoriescontained in the current directory.
The actions to be grantedare passed to the constructor in a string containing a list of one or morecomma-separated keywords. The possible keywords are "read","write", "execute", and "delete". Their meaningis defined as follows:
read    read permission
write    write permission
execute  execute permission. Allows Runtime.exec to be called. Corresponds to SecurityManager.checkExec.
delete delete permission. Allows File.delete to be called. Corresponds to SecurityManager.checkDelete.
The actions string isconverted to lowercase before processing.