Module | RecursiveUtils::FullPathList::Flag |
In: |
recursiveutils.rb
|
casefold | [RW] | 正規表現の大文字小文字を区別しない. |
debug | [RW] | 開発者用のメッセージを出力する. |
directory | [RW] | ディレクトリを除く. |
executable | [RW] | 実行権のチェックを行う. |
file_code | [RW] | ファイル名の文字コード名. |
file_type | [RW] | ファイルタイプを限定する. 先頭の文字が f (regular file), d (directory), s (symbolic link) の時のみ有効. 設定されると @regular, @directory, @symlink は無視される. |
group | [RW] | グループ所有者のチェックを行う. |
input_code | [RW] | 正規表現の文字コード名. |
owner | [RW] | 所有者のチェックを行う. |
prune | [RW] | 正規表現でマッチしたファイルを除く. |
readable | [RW] | 読み込み権のチェックを行う. |
recursive | [RW] | 再帰処理を行う. |
regular | [RW] | 通常ファイルを除く. |
symlink | [RW] | シンボリックリンクを除く. |
target | [RW] | 正規表現でマッチしたファイル以外を除く. |
warning | [RW] | 冗長な警告メッセージを出力する. |
writable | [RW] | 書き込み権のチェックを行う. |
オプションを Hash に変換して返す.
# File recursiveutils.rb, line 165 def flag2hash { :recursive => @recursive, :regular => @regular, :directory => @directory, :symlink => @symlink, :file_type => @file_type, :owner => @owner, :group => @group, :readable => @readable, :writable => @writable, :executable => @executable, :target => @target, :prune => @prune, :casefold => @casefold, :input_code => @input_code, :file_code => @file_code, :warning => @warning, :debug => @debug } end
Hash opts を元にオプションを設定する.
# File recursiveutils.rb, line 144 def set_flag(opts) @recursive = opts[:recursive] @regular = opts[:regular] @directory = opts[:directory] @symlink = opts[:symlink] @file_type = opts[:file_type] @owner = opts[:owner] @group = opts[:group] @readable = opts[:readable] @writable = opts[:writable] @executable = opts[:executable] @target = opts[:target] @prune = opts[:prune] @casefold = opts[:casefold] @input_code = opts[:input_code] @file_code = opts[:file_code] @warning = opts[:warning] @debug = opts[:debug] end