method
mode_mask
v1_9_3_392 -
Show latest stable
-
0 notes -
Class: FileUtils
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
mode_mask(mode, path)
public
Hide source
# File lib/fileutils.rb, line 885 def mode_mask(mode, path) #:nodoc: mask = 0 mode.each_byte do |byte_chr| case byte_chr.chr when "r" mask |= 0444 when "w" mask |= 0222 when "x" mask |= 0111 when "X" mask |= 0111 if FileTest::directory? path when "s" mask |= 06000 when "t" mask |= 01000 end end mask end