summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-14 04:26:20 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-14 04:26:20 +0000
commitc8b0b5362c1bf354d1b4141a11b3192d1668e1f5 (patch)
tree24bc7498bd2ccfb116fef73d9abbf0c8c795718d /lib
parenta4b0291fcb4bbb53c57fbaeaeb5b16d8aa63d5a7 (diff)
downloadruby-c8b0b5362c1bf354d1b4141a11b3192d1668e1f5.tar.gz
* lib/fileutils.rb (chmod): Add "X" to modes, convert format to table
[ruby-core:48965] [Bug #7288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/fileutils.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 3d74eac385..af2d19ac61 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1016,18 +1016,20 @@ public
# FileUtils.chmod "u=wr,go=rr", %w(my.rb your.rb his.rb her.rb)
# FileUtils.chmod "u=wrx,go=rx", '/usr/bin/ruby', :verbose => true
#
- # "a" is user, group, other mask.
- # "u" is user's mask.
- # "g" is group's mask.
- # "o" is other's mask.
- # "w" is write permission.
- # "r" is read permission.
- # "x" is execute permission.
- # "s" is uid, gid.
- # "t" is sticky bit.
- # "+" is added to a class given the specified mode.
- # "-" Is removed from a given class given mode.
- # "=" Is the exact nature of the class will be given a specified mode.
+ # "a" :: is user, group, other mask.
+ # "u" :: is user's mask.
+ # "g" :: is group's mask.
+ # "o" :: is other's mask.
+ # "w" :: is write permission.
+ # "r" :: is read permission.
+ # "x" :: is execute permission.
+ # "X" ::
+ # is execute permission for directories only, must be used in conjunction with "+"
+ # "s" :: is uid, gid.
+ # "t" :: is sticky bit.
+ # "+" :: is added to a class given the specified mode.
+ # "-" :: Is removed from a given class given mode.
+ # "=" :: Is the exact nature of the class will be given a specified mode.
def chmod(mode, list, options = {})
fu_check_options options, OPT_TABLE['chmod']