33件ヒット
[1-33件を表示]
(0.086秒)
検索結果
-
File
. size(path) -> Integer (26227.0) -
FileTest.#size と同じです。
...
FileTest.#size と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. size?(path) -> Integer | nil (14227.0) -
FileTest.#size? と同じです。
...
FileTest.#size? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. truncate(path , length) -> 0 (8132.0) -
path で指定されたファイルのサイズを最大 length バイト にします。
...
path で指定されたファイルのサイズを最大 length バイト
にします。
サイズの変更に成功すれば 0 を返します。失敗した場合は例外
Errno::EXXX が発生します。
@param path パスを表す文字列を指定します。
@param length 変更したい......サイズを整数で与えます。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "1234567890")
File.truncate("testfile", 5) # => 0
File.size("testfile") # => 5
//}...