るりまサーチ

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

別のキーワード

  1. _builtin tmpfile
  2. constants tmpfile
  3. tmpfile _builtin
  4. tmpfile file::constants

ライブラリ

クラス

モジュール

キーワード

検索結果

File::Constants::TMPFILE -> Integer (18117.0)

名前なしの一時ファイルを作成します。 open(2) で O_TMPFILE が指定できる場合に使えます。 File.openで使用します。

...名前なしの一時ファイルを作成します。
open(2) で O_TMPFILE が指定できる場合に使えます。
File.openで使用します。...

File#path -> String (24.0)

オープン時に使用したパスを文字列で返します。

...りません。
たとえば、ファイルが移動されていたり、削除されていたりする場合です。

@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path }...
...#=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...

File#to_path -> String (24.0)

オープン時に使用したパスを文字列で返します。

...りません。
たとえば、ファイルが移動されていたり、削除されていたりする場合です。

@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path }...
...#=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...

NEWS for Ruby 2.3.0 (18.0)

NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...* Enumerator::Lazy
* Enumerator::Lazy#grep_v を追加
11773

* File
* File.mkfifo
11536
* O_TMPFILE に対応する File::TMPFILE(File::Constants::TMPFILE) を追加

* Hash
* Hash#fetch_values を追加
10017
* Hash#dig を追加
11643
* Hash#<=,...

File#path -> String (12.0)

オープン時に使用したパスを文字列で返します。

...:TMPFILEオプション付きで作成されていたりする場合です。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE)...

絞り込み条件を変える

File#to_path -> String (12.0)

オープン時に使用したパスを文字列で返します。

...:TMPFILEオプション付きで作成されていたりする場合です。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE)...

shell (12.0)

Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。

...sh.cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
unless sh.exists?(dir)
sh.mkdir dir
sh.cd(dir) do
f = sh.open("tmpFile", "w")
f.puts "TEST"
f.close
end
print sh.pwd
end
end

==== Example 2:

require 'shell'
sh = Shell.cd("/tmp...
...1")
cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
if !exists?(dir)
mkdir dir
cd(dir) do
f = open("tmpFile", "w")
f.print "TEST\n"
f.close
end
print pwd
end
end
end

==== Example 3: Using Pipe

require...

NEWS for Ruby 2.5.0 (6.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...* File
* File.open :newline オプションを指定するとテキストモードになります 13350
* File#path はFile::Constants::TMPFILE付きで開いたファイルに対して IOError を発生させます
13568
* File.stat, File.exist? など rb_stat() を使用して...