method

mode_mask

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: FileUtils

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_3_392) is shown here.

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.