るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
26件ヒット [1-26件を表示] (0.095秒)
トップページ > 種類:特異メソッド[x] > クエリ:bool[x] > クラス:File[x] > バージョン:2.6.0[x]

別のキーワード

  1. option bool
  2. socket bool
  3. variant vt_bool
  4. win32ole vt_bool
  5. bool socket

ライブラリ

検索結果

File.empty?(path) -> bool (313.0)

FileTest.#zero? と同じです。

...
File
Test.#zero? と同じです。

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

File.fnmatch(pattern, path, flags = 0) -> bool (313.0)

ファイル名のパターンマッチ fnmatch(3) を行います。 path が pattern にマッチすれば真を返します。そうでない場合には false を返します。

...イルドカードとして `*',
`**`, `?', `[]', `{}' が使用できます。
//emlist[例][ruby]{
%w(foo foobar bar).each {|f|
p File.fnmatch("foo*", f)
}
# => true
# true
# false
//}

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

@param flags パターンマ...
...る定数は以下のとおりです。
これらの定数は File::Constants で定義されていますが、
File
クラスの親クラスの IO が File::Constants をインクルードしているので、
これらの定数は File::FNM_NOESCAPE などとして参照可能です。

: FNM_NOES...
...ます。
//emlist[][ruby]{
p File.fnmatch('\a', 'a') # => true
p File.fnmatch('\a', '\a', File::FNM_NOESCAPE) # => true
//}
前者で * は、エスケープされているので "*" そのものにマッチ
します。
//emlist[][ruby]{
p File.fnmatch('\*', 'a')...

File.fnmatch?(pattern, path, flags = 0) -> bool (313.0)

ファイル名のパターンマッチ fnmatch(3) を行います。 path が pattern にマッチすれば真を返します。そうでない場合には false を返します。

...イルドカードとして `*',
`**`, `?', `[]', `{}' が使用できます。
//emlist[例][ruby]{
%w(foo foobar bar).each {|f|
p File.fnmatch("foo*", f)
}
# => true
# true
# false
//}

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

@param flags パターンマ...
...る定数は以下のとおりです。
これらの定数は File::Constants で定義されていますが、
File
クラスの親クラスの IO が File::Constants をインクルードしているので、
これらの定数は File::FNM_NOESCAPE などとして参照可能です。

: FNM_NOES...
...ます。
//emlist[][ruby]{
p File.fnmatch('\a', 'a') # => true
p File.fnmatch('\a', '\a', File::FNM_NOESCAPE) # => true
//}
前者で * は、エスケープされているので "*" そのものにマッチ
します。
//emlist[][ruby]{
p File.fnmatch('\*', 'a')...

File.zero?(path) -> bool (313.0)

FileTest.#zero? と同じです。

...
File
Test.#zero? と同じです。

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

File.blockdev?(path) -> bool (310.0)

FileTest.#blockdev? と同じです。

...
File
Test.#blockdev? と同じです。

@param path パスを表す文字列か IO オブジェクトを指定します。


@see FileTest.#blockdev?...

絞り込み条件を変える

File.chardev?(path) -> bool (310.0)

FileTest.#chardev? と同じです。

...
File
Test.#chardev? と同じです。

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

File.directory?(path) -> bool (310.0)

FileTest.#directory? と同じです。

...
File
Test.#directory? と同じです。

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

File.executable?(path) -> bool (310.0)

FileTest.#executable? と同じです。

...
File
Test.#executable? と同じです。

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

File.executable_real?(path) -> bool (310.0)

FileTest.#executable_real? と同じです。

...
File
Test.#executable_real? と同じです。

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

File.exist?(path) -> bool (310.0)

FileTest.#exist? と同じです。

...
File
Test.#exist? と同じです。

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

絞り込み条件を変える

File.exists?(path) -> bool (310.0)

このメソッドは Ruby 2.1 から deprecated です。File.exist? を使用してください。

...このメソッドは Ruby 2.1 から deprecated です。File.exist? を使用してください。...

File.file?(path) -> bool (310.0)

FileTest.#file? と同じです。

...
File
Test.#file? と同じです。

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

File.grpowned?(path) -> bool (310.0)

FileTest.#grpowned? と同じです。

...
File
Test.#grpowned? と同じです。

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

File.identical?(filename1, filename2) -> bool (310.0)

FileTest.#identical? と同じです。

...
File
Test.#identical? と同じです。

@param filename1 パスを表す文字列か IO オブジェクトを指定します。

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

File.owned?(path) -> bool (310.0)

FileTest.#owned? と同じです。

...
File
Test.#owned? と同じです。

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

絞り込み条件を変える

File.pipe?(path) -> bool (310.0)

FileTest.#pipe? と同じです。

...
File
Test.#pipe? と同じです。

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

File.readable?(path) -> bool (310.0)

FileTest.#readable? と同じです。

...
File
Test.#readable? と同じです。

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

File.readable_real?(path) -> bool (310.0)

FileTest.#readable_real? と同じです。

...
File
Test.#readable_real? と同じです。

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

File.setgid?(path) -> bool (310.0)

FileTest.#setgid? と同じです。

...
File
Test.#setgid? と同じです。

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

File.setuid?(path) -> bool (310.0)

FileTest.#setuid? と同じです。

...
File
Test.#setuid? と同じです。

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

絞り込み条件を変える

File.socket?(path) -> bool (310.0)

FileTest.#socket? と同じです。

...
File
Test.#socket? と同じです。

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

File.sticky?(path) -> bool (310.0)

FileTest.#sticky? と同じです。

...
File
Test.#sticky? と同じです。

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

File.symlink?(path) -> bool (310.0)

FileTest.#symlink? と同じです。

...
File
Test.#symlink? と同じです。

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

File.world_writable?(path) -> bool (310.0)

path が全てのユーザから書き込めるならば、そのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。

...でない場合は nil を返します。

整数の意味はプラットフォームに依存します。

@param path パスを表す文字列か IO オブジェクトを指定します。

//emlist[例][ruby]{
m = File.world_writable?("/tmp")
"%o" % m #=> "777"
//}...

File.writable?(path) -> bool (310.0)

FileTest.#writable? と同じです。

...
File
Test.#writable? と同じです。

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

絞り込み条件を変える

File.writable_real?(path) -> bool (310.0)

FileTest.#writable_real? と同じです。

...
File
Test.#writable_real? と同じです。

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