別のキーワード
種類
- インスタンスメソッド (126)
- 特異メソッド (18)
- 定数 (6)
ライブラリ
-
shell
/ command-processor (150)
キーワード
- NoDelegateMethods (6)
- [] (6)
-
add
_ delegate _ command _ to _ shell (6) - basename (6)
- chmod (6)
- chown (6)
-
def
_ builtin _ commands (6) - delete (6)
- dirname (6)
- echo (6)
- ftype (6)
- glob (6)
- grpowned? (6)
- join (6)
- readlink (6)
- rm (6)
-
run
_ config (6) - setgid? (6)
- size (6)
- size? (6)
- split (6)
- test (6)
- truncate (6)
- utime (6)
検索結果
先頭5件
-
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (6101.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...attern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |f... -
Shell
:: CommandProcessor # grpowned?(file) -> bool (6101.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#grpowned?... -
Shell
:: CommandProcessor # setgid?(file) -> bool (6101.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid?... -
Shell
:: CommandProcessor . add _ delegate _ command _ to _ shell(id) (6101.0) -
@todo
@todo
Shell 自体を初期化する時に呼び出されるメソッドです。
ユーザが使用することはありません。
@param id メソッド名を指定します。 -
Shell
:: CommandProcessor . run _ config -> () (6101.0) -
ユーザのホームディレクトリに "~/.rb_shell" というファイルが存在すれば、それを Kernel.#load します。
ユーザのホームディレクトリに "~/.rb_shell" というファイルが存在すれば、それを Kernel.#load します。
存在しない時は何もしません。 -
Shell
:: CommandProcessor :: NoDelegateMethods -> [String] (6101.0) -
内部で使用する定数です。
内部で使用する定数です。 -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (101.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p... -
Shell
:: CommandProcessor # basename(filename , suffix = "") -> String (101.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
:: CommandProcessor # chmod(mode , *filename) -> Integer (101.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@see File.chmod -
Shell
:: CommandProcessor # chown(owner , group , *filename) -> Integer (101.0) -
File クラスにある同名のクラスメソッドと同じです.
...様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることがで... -
Shell
:: CommandProcessor # delete(*filename) -> Integer (101.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor # dirname(filename) -> String (101.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (101.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...Filter オブジェクトを返します.
@param strings シェルコマンド echo に与える引数を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(... -
Shell
:: CommandProcessor # expand _ path(path) -> String (101.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
:: CommandProcessor # ftype(filename) -> String (101.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.ftype -
Shell
:: CommandProcessor # join(*item) -> String (101.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
:: CommandProcessor # readlink(path) -> String (101.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink