クラス
- Array (1)
- Shell (57)
-
Shell
:: AppendFile (1) -
Shell
:: AppendIO (1) -
Shell
:: BuiltInCommand (2) -
Shell
:: Cat (1) -
Shell
:: CommandProcessor (68) -
Shell
:: Concat (1) -
Shell
:: Echo (1) -
Shell
:: Filter (52) -
Shell
:: Glob (1) -
Shell
:: ProcessController (15) -
Shell
:: SystemCommand (15) -
Shell
:: Tee (1) -
Shell
:: Void (1) - String (2)
キーワード
- < (1)
- > (1)
- >> (1)
- [] (3)
- active? (2)
-
active
_ job? (1) -
active
_ jobs (1) -
active
_ jobs _ exist? (1) -
add
_ schedule (1) - append (3)
- atime (3)
- basename (3)
- blockdev? (1)
- cat (1)
- chardev? (1)
-
check
_ point (3) - chmod (3)
- chown (3)
- command (1)
-
command
_ processor (1) - concat (3)
- ctime (3)
- cwd (1)
- debug (1)
- debug? (1)
- delete (3)
- dir (1)
-
dir
_ stack (1) - directory? (1)
- dirname (3)
- dirs (1)
- each (8)
- echo (3)
- executable? (1)
-
executable
_ real? (1) - exist? (1)
- exists? (1)
- file? (1)
-
find
_ system _ command (3) -
finish
_ all _ jobs (3) - flush (1)
- foreach (3)
- ftype (3)
- getwd (1)
- glob (3)
- grpowned? (3)
- identical? (3)
- input (1)
- input= (4)
- inspect (1)
- jobs (1)
-
jobs
_ exist? (1) - join (3)
- kill (2)
-
kill
_ job (1) - link (3)
- lstat (3)
- mkdir (1)
- mtime (3)
- name (1)
- notify (5)
- open (3)
- out (3)
- owned? (3)
- pipe? (1)
-
process
_ controller (1) - pushd (1)
- pushdir (1)
- pwd (1)
- readable? (1)
-
readable
_ real? (1) - readlink (3)
-
record
_ separator (1) - rehash (1)
- rename (3)
- rm (3)
- rmdir (1)
- setgid? (1)
- setuid? (1)
- sfork (1)
- shell (1)
- shellescape (1)
- shelljoin (1)
- shellsplit (1)
- size (3)
- size? (3)
- socket? (1)
- split (3)
- start (1)
-
start
_ export (1) -
start
_ import (1) -
start
_ job (1) - stat (3)
- sticky? (1)
-
super
_ each (1) - symlink (3)
- symlink? (3)
- system (3)
- tee (1)
- terminate (1)
-
terminate
_ job (1) - test (3)
-
to
_ a (1) -
to
_ s (1) - transact (3)
- truncate (3)
- unlink (3)
- utime (3)
- wait? (2)
-
wait
_ all _ jobs _ execution (1) -
waiting
_ job? (1) -
waiting
_ jobs (1) -
waiting
_ jobs _ exist? (1) -
world
_ readable? (1) -
world
_ writable? (1) - writable? (1)
-
writable
_ real? (1) - zero? (1)
- | (1)
検索結果
先頭5件
-
Shell
:: CommandProcessor # find _ system _ command(command) (45907.0) -
@todo
@todo -
Shell
# find _ system _ command(command) (36910.0) -
@todo
@todo -
Shell
:: Filter # find _ system _ command(command) (36907.0) -
@todo
@todo -
Shell
:: CommandProcessor # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (27907.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: CommandProcessor # expand _ path(path) -> String (27307.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
:: SystemCommand # command -> String (27307.0) -
@todo
@todo
コマンド名を返します。 -
Shell
:: SystemCommand # name -> String (27307.0) -
@todo
@todo
コマンド名を返します。 -
Shell
# append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (18910.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: Filter # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (18907.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
# basename(filename , suffix = "") -> String (18610.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
# command _ processor -> Shell :: CommandProcessor (18610.0) -
@todo
@todo -
Shell
# concat(*jobs) -> Shell :: Concat (18610.0) -
@todo
@todo -
Shell
# dirname(filename) -> String (18610.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
# process _ controller -> Shell :: ProcessController (18610.0) -
@todo
@todo -
Shell
:: CommandProcessor # basename(filename , suffix = "") -> String (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
:: CommandProcessor # concat(*jobs) -> Shell :: Concat (18607.0) -
@todo
@todo -
Shell
:: CommandProcessor # dirname(filename) -> String (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
:: Filter # basename(filename , suffix = "") -> String (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
:: Filter # concat(*jobs) -> Shell :: Concat (18607.0) -
@todo
@todo -
Shell
:: Filter # dirname(filename) -> String (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
:: SystemCommand # input=(inp) (18607.0) -
@todo
@todo -
Shell
# check _ point (18310.0) -
@todo
@todo -
Shell
# chown(owner , group , *filename) -> Integer (18310.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることができます。
@param filename ファイル名を表す文字列を指定します。
@see File.chown -
Shell
# expand _ path(path) -> String (18310.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
# finish _ all _ jobs (18310.0) -
@todo
@todo -
Shell
# grpowned?(file) -> bool (18310.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#grpowned? -
Shell
# identical? (18310.0) -
@todo
@todo -
Shell
# join(*item) -> String (18310.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
# link(old , new) -> 0 (18310.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
# notify(*opts) { . . . } -> () (18310.0) -
@todo
@todo -
Shell
# open(path , mode) -> File | Dir (18310.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 (18310.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#owned? -
Shell
# readlink(path) -> String (18310.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
# rename(from , to) -> 0 (18310.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
# symlink(old , new) -> 0 (18310.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
# symlink?(file) -> bool (18310.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#symlink? -
Shell
# transact { . . . } -> object (18310.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
# truncate(path , length) -> 0 (18310.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
# unlink(path) -> self (18310.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink -
Array
# shelljoin -> String (18307.0) -
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。
...スケープを適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。
array.shelljoin は、Shellwords.shelljoin(array) と等価です。
@return エスケープ結果を連結した文字列を返します。
@see Shellwords.#shelljoin... -
Shell
:: AppendFile # input=(filter) (18307.0) -
@todo
@todo -
Shell
:: AppendIO # input=(filter) (18307.0) -
@todo
@todo -
Shell
:: CommandProcessor # check _ point (18307.0) -
@todo
@todo -
Shell
:: CommandProcessor # chown(owner , group , *filename) -> Integer (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることができます。
@param filename ファイル名を表す文字列を指定します。
@see File.chown -
Shell
:: CommandProcessor # finish _ all _ jobs (18307.0) -
@todo
@todo -
Shell
:: CommandProcessor # grpowned?(file) -> bool (18307.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#grpowned? -
Shell
:: CommandProcessor # identical? (18307.0) -
@todo
@todo -
Shell
:: CommandProcessor # join(*item) -> String (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
:: CommandProcessor # link(old , new) -> 0 (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
:: CommandProcessor # notify(*opts) { . . . } -> () (18307.0) -
@todo
@todo -
Shell
:: CommandProcessor # open(path , mode) -> File | Dir (18307.0) -
path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。
path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。
@param path 開きたいパスを指定します。
@param mode アクセスモードを指定します。path がディレクトリの場合は無視されます。
@see File.open, Dir.open -
Shell
:: CommandProcessor # owned?(file) -> bool (18307.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#owned? -
Shell
:: CommandProcessor # readlink(path) -> String (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
:: CommandProcessor # rename(from , to) -> 0 (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
:: CommandProcessor # symlink(old , new) -> 0 (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
:: CommandProcessor # symlink?(file) -> bool (18307.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#symlink? -
Shell
:: CommandProcessor # transact { . . . } -> object (18307.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
:: CommandProcessor # truncate(path , length) -> 0 (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: CommandProcessor # unlink(path) -> self (18307.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink -
Shell
:: Filter # check _ point (18307.0) -
@todo
@todo -
Shell
:: Filter # chown(owner , group , *filename) -> Integer (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることができます。
@param filename ファイル名を表す文字列を指定します。
@see File.chown -
Shell
:: Filter # finish _ all _ jobs (18307.0) -
@todo
@todo -
Shell
:: Filter # grpowned?(file) -> bool (18307.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#grpowned? -
Shell
:: Filter # identical? (18307.0) -
@todo
@todo -
Shell
:: Filter # input -> Shell :: Filter | nil (18307.0) -
現在のフィルターを返します。
現在のフィルターを返します。 -
Shell
:: Filter # input=(filter) (18307.0) -
フィルターを設定します。
フィルターを設定します。
@param filter フィルターを指定します。 -
Shell
:: Filter # inspect -> String (18307.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
オブジェクトを人間が読める形式に変換した文字列を返します。
@see Object#inspect -
Shell
:: Filter # join(*item) -> String (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
:: Filter # link(old , new) -> 0 (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
:: Filter # notify(*opts) { . . . } -> () (18307.0) -
@todo
@todo -
Shell
:: Filter # open(path , mode) -> File | Dir (18307.0) -
path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。
path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。
@param path 開きたいパスを指定します。
@param mode アクセスモードを指定します。path がディレクトリの場合は無視されます。
@see File.open, Dir.open -
Shell
:: Filter # owned?(file) -> bool (18307.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#owned? -
Shell
:: Filter # readlink(path) -> String (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
:: Filter # rename(from , to) -> 0 (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
:: Filter # symlink(old , new) -> 0 (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
:: Filter # symlink?(file) -> bool (18307.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#symlink? -
Shell
:: Filter # transact { . . . } -> object (18307.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
:: Filter # truncate(path , length) -> 0 (18307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: Filter # unlink(path) -> self (18307.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink -
Shell
:: ProcessController # terminate _ job(command) (18307.0) -
指定されたコマンドを終了します。
指定されたコマンドを終了します。
@param command コマンドを指定します。 -
Shell
:: ProcessController # wait _ all _ jobs _ execution -> () (18307.0) -
全てのジョブの実行が終わるまで待ちます。
全てのジョブの実行が終わるまで待ちます。 -
Shell
:: ProcessController # waiting _ job?(job) -> bool (18307.0) -
指定されたジョブが存在する場合は真を返します。 そうでない場合は偽を返します。
指定されたジョブが存在する場合は真を返します。
そうでない場合は偽を返します。
@param job ジョブを指定します。 -
Shell
:: ProcessController # waiting _ jobs -> Array (18307.0) -
待機中のジョブを返します。
待機中のジョブを返します。 -
Shell
:: ProcessController # waiting _ jobs _ exist? -> bool (18307.0) -
待機中のジョブが存在する場合は真を返します。 そうでない場合は偽を返します。
待機中のジョブが存在する場合は真を返します。
そうでない場合は偽を返します。 -
Shell
:: SystemCommand # notify(*opts) -> String (18307.0) -
@todo
...@todo
@param opts
@see Shell#notify... -
Shell
:: SystemCommand # notify(*opts) {|message| . . . } -> String (18307.0) -
@todo
...@todo
@param opts
@see Shell#notify... -
Shell
:: SystemCommand # terminate -> () (18307.0) -
@todo
@todo -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (9625.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
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (9307.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
:: CommandProcessor # atime(filename) -> Time (9307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime -
Shell
:: CommandProcessor # chmod(mode , *filename) -> Integer (9307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@see File.chmod -
Shell
:: CommandProcessor # ctime(filename) -> Time (9307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime -
Shell
:: CommandProcessor # delete(*filename) -> Integer (9307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (9307.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
:: CommandProcessor # foreach(path = nil , &block) -> () (9307.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
:: CommandProcessor # ftype(filename) -> String (9307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.ftype -
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (9307.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
:: CommandProcessor # lstat(filename) -> File :: Stat (9307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.lstat -
Shell
:: CommandProcessor # mtime(filename) -> Time (9307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.mtime -
Shell
:: CommandProcessor # rm(*filename) -> Integer (9307.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete