819件ヒット
[701-800件を表示]
(0.113秒)
ライブラリ
- ビルトイン (48)
- pathname (297)
- shell (150)
-
shell
/ command-processor (150) -
shell
/ filter (150) - tempfile (24)
クラス
-
File
:: Stat (36) - Module (12)
- Pathname (297)
- Shell (150)
-
Shell
:: CommandProcessor (150) -
Shell
:: Filter (150) - Tempfile (24)
キーワード
- [] (18)
- blockdev? (30)
- chardev? (30)
- close (12)
- close! (12)
- directory? (42)
- empty? (9)
- executable? (30)
-
executable
_ real? (30) - exist? (30)
- exists? (18)
- file? (30)
- grpowned? (30)
- include (12)
- owned? (30)
- pipe? (30)
- readable? (30)
-
readable
_ real? (30) - setgid? (30)
- setuid? (30)
- size (30)
- size? (42)
- socket? (30)
- sticky? (30)
- symlink? (42)
- test (18)
-
world
_ readable? (12) -
world
_ writable? (12) - writable? (30)
-
writable
_ real? (30) - zero? (30)
検索結果
先頭5件
-
Shell
:: Filter # setgid?(file) -> bool (23.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid?... -
Shell
:: Filter # setuid?(file) -> bool (23.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid?... -
Shell
:: Filter # socket?(file) -> bool (23.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#socket?... -
Shell
:: Filter # sticky?(file) -> bool (23.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#sticky?... -
Shell
:: Filter # symlink?(file) -> bool (23.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#symlink?... -
Shell
:: Filter # writable?(file) -> bool (23.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable?... -
Shell
:: Filter # writable _ real?(file) -> bool (23.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable_real?... -
Shell
:: Filter # zero?(file) -> bool (23.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#zero?... -
Module
# include(*mod) -> self (13.0) -
モジュール mod をインクルードします。
...継承の代わりに用いられており、 mix-in とも呼びます。
//emlist[例][ruby]{
class C
include FileTest
include Math
end
p C.ancestors
# => [C, Math, FileTest, Object, Kernel]
//}
モジュールの機能追加は、クラスの継承関係の間にそのモジュールが... -
File
:: Stat # directory? -> bool (7.0) -
ディレクトリの時に真を返します。
...ディレクトリの時に真を返します。
//emlist[][ruby]{
p File::Stat.new($0).directory? #=> false
//}
@see FileTest.#directory?... -
File
:: Stat # size? -> Integer | nil (7.0) -
サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。
...はnil、それ以外の場合はファイルサイズを返します。
//emlist[][ruby]{
require 'tempfile'
fp = Tempfile.new("temp")
p fp.size #=> 0
p File::Stat.new(fp.path).size? #=> nil
fp.print "not 0 "
fp.close
p FileTest.exist?(fp.path) #=> true
p File::Stat.new(fp.path).size? #=> 6
//}... -
File
:: Stat # symlink? -> false (7.0) -
シンボリックリンクである時に真を返します。 ただし、File::Statは自動的にシンボリックリンクをたどっていくので 常にfalseを返します。
...たどっていくので
常にfalseを返します。
//emlist[][ruby]{
require 'fileutils'
outfile = $0 + ".ln"
FileUtils.ln_s($0, outfile)
p File::Stat.new(outfile).symlink? #=> false
p File.lstat(outfile).symlink? #=> true
p FileTest.symlink?(outfile) #=> true
//}
@see File.lstat... -
Tempfile
# close! -> nil (7.0) -
テンポラリファイルをクローズし、すぐに削除します。
...テンポラリファイルをクローズし、すぐに削除します。
require "tempfile"
tf = Tempfile.open("bar")
path = tf.path
tf.close!
p FileTest.exist?(path) # => false...