るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.018秒)
トップページ > クエリ:Dir[x] > クラス:Shell::CommandProcessor[x]

別のキーワード

  1. dir open
  2. dir chdir
  3. dir foreach
  4. dir each_child
  5. rake original_dir

ライブラリ

キーワード

検索結果

Shell::CommandProcessor#mkdir(*path) -> Array (6117.0)

Dir.mkdirと同じです。 (複数可)

...
Dir
.mkdirと同じです。 (複数可)

@param path 作成するディレクトリ名を文字列で指定します。

@return 作成するディレクトリの一覧の配列を返します。

使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=>...

Shell::CommandProcessor#rmdir(*path) -> () (6117.0)

Dir.rmdirと同じです。 (複数可)

...
Dir
.rmdirと同じです。 (複数可)

@param path 削除するディレクトリ名を文字列で指定します。...

Shell::CommandProcessor#directory?(file) -> bool (6101.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

...FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@see FileTest.#directory?...

Shell::CommandProcessor#dirname(filename) -> String (6101.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param filename ファイル名を表す文字列を指定します。

@see File.dirname...

Shell::CommandProcessor#open(path, mode) -> File | Dir (124.0)

path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。

...がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。

@param path 開きたいパスを指定します。

@param mode アクセスモードを指定します。path がディレクトリの場合は無視されます。

@see File.open, Dir.open...

絞り込み条件を変える

Shell::CommandProcessor#unlink(path) -> self (23.0)

path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。

...path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。

@param path 削除したいパスを指定します。

@see File.unlink, Dir.unlink...

Shell::CommandProcessor#foreach(path = nil, &block) -> () (17.0)

pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。

...pathがファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。

@param path ファイルもしくはディレクトリのパスを文字列で指定します。

使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){...

Shell::CommandProcessor#glob(pattern) -> Shell::Filter (13.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...Dir.[] を参照してください。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}

@see Dir.[]...