るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
122件ヒット [1-100件を表示] (0.068秒)
トップページ > バージョン:2.3.0[x] > クエリ:l[x] > クラス:Shell[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Shell#process_controller -> Shell::ProcessController (27904.0)

@todo

@todo

Shell.install_system_commands(pre = "sys_") -> () (27376.0)

system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.

...イルを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#kill(signal, job) -> Integer (27304.0)

@todo

@todo

ジョブにシグナルを送ります。

@param signal

@param job

Shell.alias_command(alias, command, *opts) {...} -> self (18658.0)

コマンドの別名(エイリアス)を作成します。 コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.

...コマンドの別名(エイリアス)を作成します。
コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.

@param alias エイリアスの名前を文字列で指定します.

@param command コマンド名を文字列で指定します.

@param...
...を指定します.

使用例: ls -la | sort -k 5 のような例。

require 'shell'
Shell
.def_system_command("ls")
Shell
.alias_command("lsla", "ls", "-a", "-l")
Shell
.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}...

Shell.unalias_command(alias) -> () (18658.0)

commandのaliasを削除します.

...例。
require 'shell'
Shell
.def_system_command("ls")
Shell
.alias_command("lsla", "ls", "-a", "-l")
Shell
.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}
Shell
.unalias_command("lsla")
begin
Shell
.unalias_command("...

絞り込み条件を変える

Shell#delete(*filename) -> Integer (18604.0)

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

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

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

@see File.delete

Shell#executable?(file) -> bool (18604.0)

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

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

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

@see FileTest.#executable?

Shell#executable_real?(file) -> bool (18604.0)

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

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

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

@see FileTest.#executable_real?

Shell#file?(file) -> bool (18604.0)

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

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

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

@see FileTest.#file?

Shell#readable?(file) -> bool (18604.0)

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

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

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

@see FileTest.#readable?

絞り込み条件を変える

Shell#readable_real?(file) -> bool (18604.0)

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

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

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

@see FileTest.#readable_real?

Shell#writable?(file) -> bool (18604.0)

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

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

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

@see FileTest.#writable?

Shell#writable_real?(file) -> bool (18604.0)

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

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

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

@see FileTest.#writable_real?

Shell#glob(pattern) -> Shell::Filter (18340.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) | te...

Shell#blockdev?(file) -> bool (18304.0)

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

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

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

@see FileTest.#blockdev?

絞り込み条件を変える

Shell#finish_all_jobs (18304.0)

@todo

@todo

Shell#identical? (18304.0)

@todo

@todo

Shell#link(old, new) -> 0 (18304.0)

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

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

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

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

@see File.link

Shell#lstat(filename) -> File::Stat (18304.0)

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

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

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

@see File.lstat

Shell#readlink(path) -> String (18304.0)

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

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

@param path シンボリックリンクを表す文字列を指定します。

@see File.readlink

絞り込み条件を変える

Shell#split(pathname) -> [String] (18304.0)

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

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

@param pathname パス名を表す文字列を指定します。

@see File.split

Shell#symlink(old, new) -> 0 (18304.0)

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

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

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

@param new シンボリックリンクを表す文字列を指定します。

@see File.symlink

Shell#symlink?(file) -> bool (18304.0)

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

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

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

@see FileTest.#symlink?

Shell#unlink(path) -> self (18304.0)

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

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

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

@see File.unlink, Dir.unlink

Shell#world_readable? (18304.0)

@todo

@todo

絞り込み条件を変える

Shell#world_writable? (18304.0)

@todo

@todo

Shell.debug_output_exclusive_unlock { ... } -> Mutex | nil (18304.0)

@todo

@todo

@see Mutex#exclusive_unlock

Shell.debug_output_lock -> Mutex (18304.0)

@todo

@todo

@see Thread::Mutex#lock

Shell.debug_output_locked? -> bool (18304.0)

@todo

@todo

@see Thread::Mutex#locked?

Shell.debug_output_try_lock -> bool (18304.0)

@todo

@todo

@see Thread::Mutex#try_lock

絞り込み条件を変える

Shell.debug_output_unlock -> Mutex | nil (18304.0)

@todo

@todo

@see Thread::Mutex#unlock

Shell.default_record_separator -> String (18304.0)

執筆者募集

...執筆者募集

Shell
で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。

@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定しま...

Shell.default_record_separator=(rs) (18304.0)

執筆者募集

...執筆者募集

Shell
で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。

@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定しま...

Shell.default_system_path -> Array (18304.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.default_system_path=(path) (18304.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#[](command, file1, file2 = nil) -> bool | Time | Integer | nil (9604.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"...

Shell#stat(filename) -> File::Stat (9604.0)

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

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

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

@see File.stat

Shell#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (9604.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"...

Shell.def_system_command(command, path = command) -> nil (9394.0)

Shell のメソッドとして command を登録します.

...
Shell
のメソッドとして command を登録します.

OS上のコマンドを実行するにはまず, Shellのメソッドとして定義します.
注) コマンドを定義しなくとも直接実行できる Shell#system コマンドもあります.

@param command Shell のメソッド...
...ない場合はcommand と同じになります。

例)
require 'shell'
Shell
.def_system_command "ls"
# ls を定義

Shell
.def_system_command "sys_sort", "sort"
# sortコマンドをsys_sortとして定義

sh = Shell.new
sh.transact {
ls.each { |l|
puts l
}
(ls("-l...

Shell.undef_system_command(command) -> Shell::CommandProcessor (9358.0)

commandを削除します.

...mmand 削除するコマンドの文字列を指定します。

動作例:
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
}
}
r...

絞り込み条件を変える

Shell#cat(*files) -> Shell::Filter (9340.0)

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

...@param files シェルコマンド cat に与えるファイル名を文字列で指定します。

動作例
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) | te...

Shell#echo(*strings) -> Shell::Filter (9340.0)

実行すると, それらを内容とする 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(file).each { |l|
echo(l) | tee...

Shell#system(command, *opts) -> Shell::SystemCommand (9340.0)

command を実行する.

...で指定します。

@param opts command のオプションを文字列で指定します。複数可。

使用例:

require 'shell'
Shell
.verbose = false
sh = Shell.new

print sh.system("ls", "-l")
Shell
.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT...

Shell#tee(file) -> Shell::Filter (9340.0)

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

....

@param file シェルコマンドtee に与えるファイル名を文字列で指定します。

動作例
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) | te...

Shell#out(dev = STDOUT, &block) -> () (9322.0)

Shell#transact を呼び出しその結果を dev に出力します。

...
Shell
#transact を呼び出しその結果を dev に出力します。

@param dev 出力先をIO オブジェクトなどで指定します。

@param block transact 内部で実行するシェルを指定します。


使用例:
require 'shell'
Shell
.def_system_command("head")
sh = Shell...

絞り込み条件を変える

Shell#append(to, filter) -> Shell::AppendFile | Shell::AppendIO (9304.0)

@todo

...@todo

@param to 文字列か IO を指定します。

@param filter Shell::Filter のインスタンスを指定します。...

Shell#atime(filename) -> Time (9304.0)

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

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

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

@see File.atime

Shell#basename(filename, suffix = "") -> String (9304.0)

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

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

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

@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。

@see File.basename

Shell#cd(path, &block) -> self (9304.0)

カレントディレクトリをpathにする. イテレータとして呼ばれたときには ブロック実行中のみカレントディレクトリを変更する.

...レクトリを文字列で指定します.

@param block path で指定したディレクトリで行う操作をブロックで指定します.

使用例
require 'shell'
sh = Shell.new
sh.transact {
cd("/tmp"){
p cwd #=> "/tmp"
}
p cwd #=> "/Users/kouya/rbmanual"
}...

Shell#chardev?(file) -> bool (9304.0)

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

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

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

@see FileTest.#chardev?

絞り込み条件を変える

Shell#chdir(path, &block) -> self (9304.0)

カレントディレクトリをpathにする. イテレータとして呼ばれたときには ブロック実行中のみカレントディレクトリを変更する.

...レクトリを文字列で指定します.

@param block path で指定したディレクトリで行う操作をブロックで指定します.

使用例
require 'shell'
sh = Shell.new
sh.transact {
cd("/tmp"){
p cwd #=> "/tmp"
}
p cwd #=> "/Users/kouya/rbmanual"
}...

Shell#chmod(mode, *filename) -> Integer (9304.0)

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

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

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

@param mode chmod(2) と同様に整数で指定します。

@see File.chmod

Shell#chown(owner, group, *filename) -> Integer (9304.0)

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

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

@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。

@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることができます。

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

@see File.chown

Shell#command_processor -> Shell::CommandProcessor (9304.0)

@todo

@todo

Shell#concat(*jobs) -> Shell::Concat (9304.0)

@todo

@todo

絞り込み条件を変える

Shell#ctime(filename) -> Time (9304.0)

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

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

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

@see File.ctime

Shell#debug -> bool | Integer (9304.0)

@todo

@todo

Shell#debug=(flag) (9304.0)

@todo

@todo

Shell#debug? -> bool | Integer (9304.0)

@todo

@todo

Shell#directory?(file) -> bool (9304.0)

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

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

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

@see FileTest.#directory?

絞り込み条件を変える

Shell#dirname(filename) -> String (9304.0)

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

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

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

@see File.dirname

Shell#exist?(file) -> bool (9304.0)

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

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

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

@see FileTest.#exist? FileTest.#exists?

Shell#exists?(file) -> bool (9304.0)

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

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

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

@see FileTest.#exist? FileTest.#exists?

Shell#foreach(path = nil, &block) -> () (9304.0)

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

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

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

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

Shell#ftype(filename) -> String (9304.0)

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

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

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

@see File.ftype

絞り込み条件を変える

Shell#grpowned?(file) -> bool (9304.0)

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

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

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

@see FileTest.#grpowned?

Shell#mtime(filename) -> Time (9304.0)

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

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

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

@see File.mtime

Shell#open(path, mode) -> File | Dir (9304.0)

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

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

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

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

@see File.open, Dir.open

Shell#owned?(file) -> bool (9304.0)

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

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

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

@see FileTest.#owned?

Shell#pipe?(file) -> bool (9304.0)

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

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

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

@see FileTest.#pipe?

絞り込み条件を変える

Shell#pushd(path = nil, &block) -> object (9304.0)

カレントディレクトリをディレクトリスタックにつみ, カレントディレク トリをpathにする. pathが省略されたときには, カレントディレクトリと ディレクトリスタックのトップを交換する. イテレータとして呼ばれたと きには, ブロック実行中のみpushdする.

...指定します。

@param block イテレータとして呼ぶ場合, ブロックを指定します。

動作例
require 'shell'
Shell
.verbose = false
sh = Shell.new
sh.pushd("/tmp")
p sh.cwd #=> "/tmp"
sh.pushd("/usr")
p sh.cwd #=> "/usr"
sh.popd
p sh.cwd #=> "/tmp"
sh.pushd...

Shell#pushdir(path = nil, &block) -> object (9304.0)

カレントディレクトリをディレクトリスタックにつみ, カレントディレク トリをpathにする. pathが省略されたときには, カレントディレクトリと ディレクトリスタックのトップを交換する. イテレータとして呼ばれたと きには, ブロック実行中のみpushdする.

...指定します。

@param block イテレータとして呼ぶ場合, ブロックを指定します。

動作例
require 'shell'
Shell
.verbose = false
sh = Shell.new
sh.pushd("/tmp")
p sh.cwd #=> "/tmp"
sh.pushd("/usr")
p sh.cwd #=> "/usr"
sh.popd
p sh.cwd #=> "/tmp"
sh.pushd...

Shell#rm(*filename) -> Integer (9304.0)

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

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

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

@see File.delete

Shell#setgid?(file) -> bool (9304.0)

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

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

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

@see FileTest.#setgid?

Shell#setuid?(file) -> bool (9304.0)

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

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

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

@see FileTest.#setuid?

絞り込み条件を変える

Shell#size(file) -> Integer (9304.0)

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

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

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

@see FileTest.#size FileTest.#size?

Shell#size?(file) -> Integer | nil (9304.0)

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

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

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

@see FileTest.#size FileTest.#size?

Shell#socket?(file) -> bool (9304.0)

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

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

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

@see FileTest.#socket?

Shell#sticky?(file) -> bool (9304.0)

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

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

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

@see FileTest.#sticky?

Shell#truncate(path, length) -> 0 (9304.0)

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

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

@param path パスを表す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@see File.truncate

絞り込み条件を変える

Shell#utime(atime, mtime, *filename) -> Integer (9304.0)

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

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

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

@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。

@param utime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。

@see File.utime

Shell#verbose -> bool (9304.0)

@todo

@todo

Shell#verbose=(flag) (9304.0)

@todo

@todo

Shell#verbose? -> bool (9304.0)

@todo

@todo

Shell#zero?(file) -> bool (9304.0)

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

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

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

@see FileTest.#zero?

絞り込み条件を変える

Shell.cascade -> bool (9304.0)

@todo

@todo

Shell.cascade=(flag) (9304.0)

@todo

@todo

Shell.cd(path = nil, verbose = self.verbose) -> self (9304.0)

pathをカレントディレクトリとするShellオブジェクトを生成します.

...クトリとするShellオブジェクトを生成します.

@param path カレントディレクトリとするディレクトリを文字列で指定します。

@param verbose true を指定すると冗長な出力を行います。


使用例
require 'shell'
sh = Shell.new
sh.cd("/tmp")...

Shell.debug -> bool | Integer (9304.0)

@todo

@todo

デバッグ用フラグを参照します。

Shell.debug=(val) (9304.0)

デバッグ用のフラグを設定します。

デバッグ用のフラグを設定します。

@param val bool 値や整数値を指定します。詳細は下記を参照してください。

# debug: true -> normal debug
# debug: 1 -> eval definition debug
# debug: 2 -> detail inspect debug

絞り込み条件を変える

Shell.debug? -> bool | Integer (9304.0)

@todo

@todo

デバッグ用フラグを参照します。

Shell.new(pwd = Dir.pwd, umask = nil) -> Shell (9304.0)

プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.

...プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShell
ブジェクトを生成します.

@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir....

Shell.verbose -> bool (9304.0)

@todo

@todo

Shell.verbose=(flag) (9304.0)

true ならば冗長な出力の設定を行います。

true ならば冗長な出力の設定を行います。

@param flag true ならば冗長な出力の設定を行います。

Shell.verbose? -> bool (9304.0)

@todo

@todo

絞り込み条件を変える

Shell#transact { ... } -> object (9040.0)

ブロック中で shell を self として実行します。

...ブロック中で shell を self として実行します。

例:

require 'shell'
Shell
.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
}...

Shell#check_point (9004.0)

@todo

@todo

Shell#cwd -> String (9004.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Shell#dir -> String (9004.0)

カレントディレクトリのパスを文字列で返します。

...カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...

Shell#dir_stack -> [String] (9004.0)

@todo

@todo

絞り込み条件を変える

<< 1 2 > >>