Flowdock
method

mode_mask

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: FileUtils
mode_mask(mode, path) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

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
Register or log in to add new notes.