11件ヒット
[1-11件を表示]
(0.312秒)
ライブラリ
- ビルトイン (11)
検索結果
-
File
. truncate(path , length) -> 0 (26109.0) -
path で指定されたファイルのサイズを最大 length バイト にします。
...す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "1234567890")
File.truncate("testfile", 5) # => 0
File.size("testfile") # => 5
//}...