るりまサーチ

最速Rubyリファレンスマニュアル検索!
88件ヒット [1-88件を表示] (0.025秒)
トップページ > クエリ:-[x] > クエリ:secure[x] > ライブラリ:fileutils[x]

別のキーワード

  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) -> () (6245.0)

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

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

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

この脆弱性を防ぐため、remove_entry_secure は削除前に path 以下の
ディレクトリのオーナーとパーミッションを変更し、上記の条件を回避します。
ただし remove_entry_secure は親ディレクトリが以下の条件を満たすことを...
...場合 / や /var が全ユーザから書き込み可能であってはなりません。

この条件が満たされない場合 remove_entry_secure は安全ではありません。

@param path 削除するパス。

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

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

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

...verbose, :secure が指定できます。
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 = {}) -> () (126.0)

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

...verbose, :secure が指定できます。
c:FileUtils#options

=== 注意

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

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

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

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

...verbose, :secure が指定できます。
c:FileUtils#options

=== 注意

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

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

FileUtils.#remove_entry(path, force = false) -> () (114.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...
...emove_entry_secure...

絞り込み条件を変える

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

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

...op, :verbose, :secure が指定できます。
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('...

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

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

...op, :verbose, :secure が指定できます。
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('...

FileUtils.options -> Array (108.0)

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

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

//emlist[][ruby]{
require 'fileutils'
FileUtils
.options
# => ["verbose", "mode", "noop", "parents", "force", "preserve", "dereference_root", "remove_destination", "secure", "mtime", "nocreate"]
//}...
...オプション名の配列を返します。

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