タグ

dirとruby-family-programming-languageに関するnabinnoのブックマーク (2)

  • Dir.[] (Ruby 3.3 リファレンスマニュアル)

    self[*pattern, base: nil, sort: true] -> [String][permalink][rdoc][edit] glob(pattern, flags = 0, base: nil, sort: true) -> [String] glob(pattern, flags = 0, base: nil, sort: true) {|file| ...} -> nil ワイルドカードの展開を行い、パターンにマッチするファイル名を文字列の配列として返します。パターンにマッチするファイルがない場合は空の配列を返します。 ブロックが与えられたときはワイルドカードにマッチしたファイルを引数にそのブロックを 1 つずつ評価して nil を返します [PARAM] pattern: パターンを文字列か配列で指定します。配列を指定すると複数のパターンを指定できます。 [PA

  • class Dir (Ruby 3.3 リファレンスマニュアル)

    [edit] 要約 ディレクトリの操作を行うためのクラスです。 目次 特異メソッド [] chdir children chroot delete each_child empty? entries exist? foreach getwd glob home mkdir new open pwd rmdir unlink インスタンスメソッド children close each each_child fileno inspect path pos pos= read rewind seek tell to_path 継承しているメソッド Enumerableから継承しているメソッド all? any? chain chunk chunk_while collect collect_concat compact count cycle detect drop drop_while ea

    nabinno
    nabinno 2015/08/04
  • 1