60件ヒット
[1-60件を表示]
(0.166秒)
種類
- インスタンスメソッド (30)
- 特異メソッド (30)
ライブラリ
- shell (60)
キーワード
-
debug
_ output _ try _ lock (6) -
default
_ system _ path (6) - directory? (6)
- ftype (6)
-
install
_ system _ commands (6) - jobs (6)
- mkdir (6)
- notify (6)
-
system
_ path (6) -
undef
_ system _ command (6)
検索結果
先頭5件
-
Shell
# directory?(file) -> bool (12301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#directory?... -
Shell
. debug _ output _ try _ lock -> bool (12301.0) -
@todo
...@todo
@see Mutex#try_lock......@todo
@see Thread::Mutex#try_lock... -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (6413.0) -
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.
...system_path上にある全ての実行可能ファイルをShellに定義する. メソッ
ド名は元のファイル名の頭にpreをつけたものとなる.
@param pre Shellに定義するメソッド名の先頭に付加される文字列を指定します。
使用例: ls -l | head -n 5......のような例。
require 'shell'
Shell.install_system_commands
sh = Shell.new
sh.verbose = false
sh.transact {
(sys_ls("-l") | sys_head("-n 5")).each {|l|
puts l
}
}... -
Shell
# ftype(filename) -> String (6301.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.ftype... -
Shell
# mkdir(*path) -> Array (6301.0) -
Dir.mkdirと同じです。 (複数可)
...Dir.mkdirと同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=>......["foo"]
rescue => err
puts err
end... -
Shell
# system _ path -> Array (6301.0) -
コマンドサーチパスの配列を返す。
...コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]... -
Shell
. default _ system _ path -> Array (6301.0) -
Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。
...
Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。
@param path Shellでもちいられるコマンドを検索する対象のパスを文字列で指定します。
動作例
require 'shell'
p Shell.default_system_path
# 例
#=> [......"/opt/local/bin", "/opt/local/sbin", "/usr/bin", "/bin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/X11/bin", "/Users/kouya/bin"]
Shell.default_system_path = ENV["HOME"] + "/bin"
p Shell.default_system_path
# => "/Users/kouya/bin"... -
Shell
. notify(*opts) {|message| . . . } -> String (6301.0) -
@todo
@todo -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (6301.0) -
commandを削除します.
...除します.
@param command 削除するコマンドの文字列を指定します。
動作例:
require 'shell'
Shell.def_system_command("ls")
# ls を定義
Shell.undef_system_command("ls")
# ls を 削除
sh = Shell.new
begin
sh.transact {
ls("-l").each {|l|......puts l
}
}
rescue NameError => err
puts err
end... -
Shell
# jobs -> Array (301.0) -
スケジューリングされているjobの一覧を返します。
スケジューリングされているjobの一覧を返します。