るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.024秒)
トップページ > クラス:File[x] > クエリ:path[x] > クエリ:size[x] > バージョン:2.6.0[x]

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. file path

ライブラリ

キーワード

検索結果

File.size(path) -> Integer (54676.0)

FileTest.#size と同じです。

...
File
Test.#size と同じです。

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

File.size?(path) -> Integer | nil (18676.0)

FileTest.#size? と同じです。

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

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

File.truncate(path, length) -> 0 (391.0)

path で指定されたファイルのサイズを最大 length バイト にします。

...す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@raise Errno::EXXX 失敗した場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "1234567890")
File
.truncate("testfile", 5) # => 0
File
.size("testfile") # => 5
//}...