るりまサーチ (Ruby 3.1)

最速Rubyリファレンスマニュアル検索!
8件ヒット [1-8件を表示] (0.043秒)

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

FileUtils.#remove_entry_secure(path, force = false) -> () (18733.0)

ファイル path を削除します。path がディレクトリなら再帰的に削除します。

...ら再帰的に削除します。

FileUtils
.#rm_r および FileUtils.#remove_entry には
TOCTTOU (time-of-check to time-of-use)脆弱性が存在します。
このメソッドはそれを防ぐために新設されました。
FileUtils
.#rm_r および FileUtils.#remove_entry は以下の条件...

FileUtils.#rm_r(list, options = {}) -> () (394.0)

ファイルまたはディレクトリ list を再帰的に消去します。

...re が指定できます。
c:FileUtils#options

=== 注意

このメソッドにはローカル脆弱性が存在します。
この脆弱性を回避するには :secure オプションを使用してください。
詳しくは FileUtils.#remove_entry_secure の項を参照して...
...ください。

//emlist[][ruby]{
require 'fileutils'
FileUtils
.rm_r(Dir.glob('/tmp/*'))
FileUtils
.rm_r(Dir.glob('/tmp/*'), secure: true)
//}

@see FileUtils.#rm, FileUtils.#remove_entry_secure...

FileUtils.#rm_rf(list, options = {}) -> () (376.0)

ファイルまたはディレクトリ list を再帰的に消去します。

...FileUtils#options

=== 注意

このメソッドにはローカル脆弱性が存在します。
この脆弱性を回避するには :secure オプションを使用してください。
詳しくは FileUtils.#remove_entry_secure の項を参照してください。

@see FileUtils.#rm, FileUtils...
....#rm_r, FileUtils.#remove_entry_secure...

FileUtils.#rmtree(list, options = {}) -> () (376.0)

ファイルまたはディレクトリ list を再帰的に消去します。

...FileUtils#options

=== 注意

このメソッドにはローカル脆弱性が存在します。
この脆弱性を回避するには :secure オプションを使用してください。
詳しくは FileUtils.#remove_entry_secure の項を参照してください。

@see FileUtils.#rm, FileUtils...
....#rm_r, FileUtils.#remove_entry_secure...

FileUtils.#remove_entry(path, force = false) -> () (340.0)

ファイル path を削除します。path がディレクトリなら再帰的に削除します。

... FileUtils.#remove_entry_secure の項を参照してください。

@param path 削除するパス。

@param force 真のときは削除中に発生した StandardError を無視します。

//emlist[][ruby]{
require 'fileutils'
FileUtils
.remove_entry '/tmp/ruby.tmp.08883'
//}

@see FileUtils.#r...

絞り込み条件を変える

FileUtils.#move(src, dest, options = {}) -> () (322.0)

ファイル src を dest に移動します。

...指定できます。
c:FileUtils#options

//emlist[][ruby]{
require 'fileutils'
FileUtils
.mv('badname.rb', 'goodname.rb')
FileUtils
.mv('stuff.rb', 'lib/ruby', force: true)
FileUtils
.mv(['junk.txt', 'dust.txt'], "#{ENV['HOME']}/.trash")
FileUtils
.mv(Dir.glob('test*.rb'), 'test', noop:...

FileUtils.#mv(src, dest, options = {}) -> () (322.0)

ファイル src を dest に移動します。

...指定できます。
c:FileUtils#options

//emlist[][ruby]{
require 'fileutils'
FileUtils
.mv('badname.rb', 'goodname.rb')
FileUtils
.mv('stuff.rb', 'lib/ruby', force: true)
FileUtils
.mv(['junk.txt', 'dust.txt'], "#{ENV['HOME']}/.trash")
FileUtils
.mv(Dir.glob('test*.rb'), 'test', noop:...

FileUtils.options -> Array (322.0)

オプション名の配列を返します。

...オプション名の配列を返します。

//emlist[][ruby]{
require 'fileutils'
FileUtils
.options
# => ["noop", "verbose", "force", "mode", "parents", "owner", "group", "preserve", "dereference_root", "remove_destination", "secure", "mtime", "nocreate"]
//}...