るりまサーチ

最速Rubyリファレンスマニュアル検索!
192件ヒット [1-100件を表示] (0.011秒)
トップページ > クエリ:dev[x] > 種類:モジュール関数[x]

別のキーワード

  1. etc sc_2_c_dev
  2. etc sc_2_sw_dev
  3. etc sc_2_fort_dev
  4. stat dev
  5. logger dev

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

FileTest.#blockdev?(file) -> bool (6119.0)

ファイルがブロックスペシャルファイルである時に真を返します。 そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

...す文字列か IO オブジェクトを指定します。

@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。

例:
Dir.glob("/dev/*") { |file|
puts file if FileTest.blockdev?(file)
}
# /dev/disk0
# /dev/disk0s3
# ......

FileTest.#chardev?(file) -> bool (6119.0)

ファイルがキャラクタスペシャルファイルの時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

...表す文字列か IO オブジェクトを指定します。

@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。

例:
Dir.glob("/dev/*") { |file|
puts file if FileTest.chardev?(file)
}
# /dev/console
# /dev/tty
# ......

Kernel.#spawn(env, program, *args, options={}) -> Integer (19.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...名も指定できます。
//emlist[][ruby]{
pid = spawn(command, :in=>"/dev/null") # read mode
pid = spawn(command, :out=>"/dev/null") # write mode
pid = spawn(command, :err=>"log") # write mode
pid = spawn(command, 3=>"/dev/null") # read mode
//}
stdout と stderr をリダイレクトした場...

Kernel.#spawn(program, *args) -> Integer (19.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...名も指定できます。
//emlist[][ruby]{
pid = spawn(command, :in=>"/dev/null") # read mode
pid = spawn(command, :out=>"/dev/null") # write mode
pid = spawn(command, :err=>"log") # write mode
pid = spawn(command, 3=>"/dev/null") # read mode
//}
stdout と stderr をリダイレクトした場...

FileUtils.#cmp(file_a, file_b) -> bool (13.0)

ファイル file_a と file_b の内容が同じなら真を返します。

...ファイル file_a と file_b の内容が同じなら真を返します。

@param file_a ファイル名。

@param file_b ファイル名。

//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}...

絞り込み条件を変える

FileUtils.#compare_file(file_a, file_b) -> bool (13.0)

ファイル file_a と file_b の内容が同じなら真を返します。

...ファイル file_a と file_b の内容が同じなら真を返します。

@param file_a ファイル名。

@param file_b ファイル名。

//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}...

FileUtils.#identical?(file_a, file_b) -> bool (13.0)

ファイル file_a と file_b の内容が同じなら真を返します。

...ファイル file_a と file_b の内容が同じなら真を返します。

@param file_a ファイル名。

@param file_b ファイル名。

//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}...

Kernel.#format(format, *arg) -> String (7.0)

format 文字列を C 言語の sprintf と同じように解釈し、 引数をフォーマットした文字列を返します。

format 文字列を C 言語の sprintf と同じように解釈し、
引数をフォーマットした文字列を返します。

@param format フォーマット文字列です。
@param arg フォーマットされる引数です。
@see Kernel.#printf,Time#strftime,Date.strptime

=== sprintf フォーマット

Ruby の sprintf フォーマットは基本的に C 言語の sprintf(3)
のものと同じです。ただし、short や long などの C 特有の型に対する修飾子が
ないこと、2進数の指示子(%b, %B)が存在すること、s...

Kernel.#open(file, mode_enc = "r", perm = 0666) -> IO (7.0)

file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。

...イルを区別する場
合に限ります)


=== Universal Newline
改行をLFに揃えます。一言で言えばPEP:278 https://www.python.org/dev/peps/pep-0278/のことです。

: "rt"
CR、LF、CRLFのいずれをもLFとして読み込む。
: "rb"
CR、LF、CRLFはいずれもそ...
...とは限りません (例えばパイプ)。

=== Universal Newline
改行をLFに揃えます。一言で言えばPEP:278 https://www.python.org/dev/peps/pep-0278/のことです。

: "rt"
CR、LF、CRLFのいずれをもLFとして読み込む。
: "rb"
CR、LF、CRLFはいずれもそ...
<< 1 2 > >>