62件ヒット
[1-62件を表示]
(0.077秒)
種類
- インスタンスメソッド (40)
- 特異メソッド (11)
- モジュール関数 (11)
ライブラリ
- ビルトイン (22)
- fileutils (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - tempfile (11)
クラス
- File (11)
-
File
:: Stat (11) - Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - Tempfile (11)
モジュール
- FileUtils (11)
キーワード
-
safe
_ unlink (11) - unlink (40)
検索結果
先頭5件
-
File
. unlink(*filename) -> Integer (27330.0) -
ファイルを削除します。削除したファイルの数を返します。 削除に失敗した場合は例外 Errno::EXXX が発生します。
...m filename ファイル名を表す文字列を指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("test.txt", "test")
p File.exist?("test.txt") # => true
p File.delete("test.txt") # => 1
p File.exist?("test.txt") # => false
begin
File.......delete("test.txt")
rescue
p $! # => #<Errno::ENOENT: No such file or directory @ unlink_internal - test.txt>
end
//}... -
File
:: Stat # nlink -> Integer (27213.0) -
ハードリンクの数を返します。
...ハードリンクの数を返します。
//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.nlink #=> 1
//}... -
Shell
# unlink(path) -> self (12222.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
...path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink... -
Shell
:: CommandProcessor # unlink(path) -> self (12222.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
...path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink... -
Shell
:: Filter # unlink(path) -> self (12222.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
...path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink... -
FileUtils
. # safe _ unlink(list , options = {}) -> () (9200.0) -
FileUtils.rm(list, force: true) と同じです。
...
FileUtils.rm(list, force: true) と同じです。
c:FileUtils#options
@param list 削除する対象。一つの場合は文字列も指定可能です。
二つ以上指定する場合は配列で指定します。
@param options :noop, :verbose が指定できます。......:force がセットされた場合は作業中すべての StandardError を無視します。
@see FileUtils.#rm... -
Tempfile
# unlink -> self (9200.0) -
テンポラリファイルをクローズせずに、削除します。 UNIXライクなシステムでは、 作成したテンポラリファイルが他のプログラムに使用される機会をなくすために、 テンポラリファイルを作成しオープンした後、 すぐに削除するということがしばしばおこなわれます。
...ンポラリファイルを作成しオープンした後、
すぐに削除するということがしばしばおこなわれます。
require "tempfile"
tf = Tempfile.new("foo")
tf.unlink
p tf.path # => nil
tf.print("foobar,hoge\n")
tf.rewind
p tf.gets("\n") # => "foobar,hoge\n"...