るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.034秒)
トップページ > クエリ:Kernel[x] > クエリ:File[x] > モジュール:FileTest[x]

別のキーワード

  1. kernel exec
  2. kernel spawn
  3. kernel system
  4. kernel open
  5. kernel raise

ライブラリ

検索結果

FileTest.#identical?(file1, file2) -> bool (3319.0)

file1 と file2 が同じファイルを指している時に真を返します。 そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

...
file
1 と file2 が同じファイルを指している時に真を返します。
そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

ruby 1.8.3 以前ではKernel.#test(?-, file1, file2)を使...
...p File.identical?("a", "a") #=> true
p File.identical?("a", "./a") #=> true
File
.link("a", "b")
p File.identical?("a", "b") #=> true
File
.symlink("a", "c")
p File.identical?("a", "c") #=> true
open("d", "w") {}
p File.identical?("a", "d") #=> false

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

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

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