るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. _builtin name
  2. resolv each_name
  3. win32ole name
  4. openssl name
  5. net/imap name

ライブラリ

クラス

キーワード

検索結果

Pathname#exist? -> bool (63604.0)

FileTest.exist?(self.to_s) と同じです。

FileTest.exist?(self.to_s) と同じです。


@see FileTest.#exist?

Dir.exist?(file_name) -> bool (54970.0)

file_name で与えられたディレクトリが存在する場合に真を返します。 そうでない場合は、偽を返します。

file_name で与えられたディレクトリが存在する場合に真を返します。
そうでない場合は、偽を返します。

@param file_name 存在を確認したいディレクトリ名。

//emlist[例][ruby]{
Dir.exist?(".") # => true
File.directory?(".") # => true
//}

@see File.directory?

Pathname#delete -> Integer (27337.0)

self が指すディレクトリあるいはファイルを削除します。

self が指すディレクトリあるいはファイルを削除します。

//emlist[例][ruby]{
require "pathname"

pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}

Pathname#unlink -> Integer (27337.0)

self が指すディレクトリあるいはファイルを削除します。

self が指すディレクトリあるいはファイルを削除します。

//emlist[例][ruby]{
require "pathname"

pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}