This commit is contained in:
Artur 2013-01-08 11:31:20 -05:00
Родитель 91cb4ebb66
Коммит 98f3b0b2ef
3 изменённых файлов: 30 добавлений и 2 удалений

Просмотреть файл

@ -447,6 +447,31 @@ the `callback` gets the arguments `(code, output)`.
the current synchronous implementation uses a lot of CPU. This should be getting
fixed soon.
### chmod(octal_mode, file)
### chmod(symbolic_mode, file)
Available options:
+ `-v`: output a diagnostic for every file processed
+ `-c`: like verbose but report only when a change is made
+ `-R`: change files and directories recursively
Examples:
```javascript
chmod(755, '/Users/brandon')
chmod('u+x', '/Users/brandon')
```
Alters the permissions of a file or directory by either specifying the
absolute permissions in octal form or expressing the changes in symbols.
This command tries to mimic the POSIX behavior as much as possible.
Notable exceptions:
+ In symbolic modes, 'a-r' and '-r' are identical. No consideration is
given to the umask.
+ There is no "quiet" option since default behavior is to run silent.
## Configuration

Просмотреть файл

@ -1143,11 +1143,13 @@ var PERMS = (function (base) {
//@
//@ ### chmod(octal_mode, file)
//@ ### chmod(symbolic_mode, file)
//@
//@ Available options:
//@
//@ + `-v`: output a diagnostic for every file processed//@
//@ + `-c`: like verbose but report only when a change is made//@
//@ + `-R`: change files and directories recursively//@
//@
//@ Examples:
//@
//@ ```javascript
@ -1159,9 +1161,10 @@ var PERMS = (function (base) {
//@ absolute permissions in octal form or expressing the changes in symbols.
//@ This command tries to mimic the POSIX behavior as much as possible.
//@ Notable exceptions:
//@ - In symbolic modes, 'a-r' and '-r' are identical. No consideration is
//@
//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is
//@ given to the umask.
//@ - There is no "quiet" option since default behavior is to run silent.
//@ + There is no "quiet" option since default behavior is to run silent.
function _chmod(options, mode, filePattern) {
if (!filePattern) {
if (options.length > 0 && options.charAt(0) === '-') {

0
test/resources/chmod/b/a/b/.gitignore поставляемый Normal file → Executable file
Просмотреть файл