Crossfire JXClient, Trunk
|
Classes | |
interface | Changer |
class | TreeVisitor |
Static Public Member Functions | |
static Changer | compile (String exprs) |
static void | main (String[] args) throws IOException |
Static Package Functions | |
static void | chmod (Path file, Changer changer) |
static void | usage () |
Sample code that changes the permissions of files in a similar manner to the chmod(1) program.
Definition at line 53 of file Chmod.java.
|
staticpackage |
Changes the permissions of the file using the given Changer.
Definition at line 276 of file Chmod.java.
References Chmod.Changer.change(), and file.
Referenced by Chmod.TreeVisitor.preVisitDirectory(), and Chmod.TreeVisitor.visitFile().
|
static |
Compiles a list of one or more symbolic mode expressions that may be used to change a set of file permissions. This method is intended for use where file permissions are required to be changed in a manner similar to the UNIX chmod program.
The
parameter is a comma separated list of expressions where each takes the form:
who operator [permissions]
where who is one or more of the characters
,
,
, or
meaning the owner (user), group, others, or all (owner, group, and others) respectively.
operator is the character
,
, or
signifying how permissions are to be changed.
means the permissions are added,
means the permissions are removed, and
means the permissions are assigned absolutely.
permissions is a sequence of zero or more of the following:
for read permission,
for write permission, and
for execute permission. If permissions is omitted when assigned absolutely, then the permissions are cleared for the owner, group, or others as identified by who. When omitted when adding or removing then the expression is ignored.
The following examples demonstrate possible values for the
parameter:
u=rw
| Sets the owner permissions to be read and write. |
ug+w
| Sets the owner write and group write permissions. |
u+w,o-rwx
| Sets the owner write, and removes the others read, others write and others execute permissions. |
o=
| Sets the others permission to none (others read, others write and others execute permissions are removed if set) |
exprs | List of one or more symbolic mode expressions |
IllegalArgumentException | If the value of the exprs
|
Definition at line 115 of file Chmod.java.
Referenced by main().
|
static |
Definition at line 326 of file Chmod.java.
References compile(), file, and usage().
|
staticpackage |
Definition at line 321 of file Chmod.java.
Referenced by main().