別のキーワード
モジュール
- FileTest (174)
- FileUtils (391)
- JSON (36)
- Kernel (306)
- Marshal (24)
- ObjectSpace (12)
-
OpenSSL
:: ASN1 (12) - Timeout (21)
キーワード
-
allocation
_ sourcefile (12) - caller (36)
- cd (24)
- chdir (24)
- chmod (12)
-
chmod
_ R (12) - chown (12)
-
chown
_ R (12) - cmp (12)
-
compare
_ file (12) - copy (12)
- cp (12)
-
cp
_ lr (7) -
cp
_ r (12) - decode (12)
- dump (36)
- empty? (9)
-
executable
_ real? (12) - exists? (9)
- fail (36)
- gets (12)
- grpowned? (12)
- identical? (24)
- install (12)
- link (12)
- ln (12)
-
ln
_ s (12) - load (12)
-
load
_ file (12) -
load
_ file! (12) - makedirs (12)
- mkdir (12)
-
mkdir
_ p (12) - mkpath (12)
- move (12)
- mv (12)
- open (26)
- owned? (12)
- raise (36)
- readable? (12)
- readline (12)
- remove (12)
-
remove
_ entry (12) - require (12)
-
require
_ relative (12) - rm (12)
-
rm
_ r (12) - rmdir (12)
-
set
_ trace _ func (12) - setgid? (12)
- setuid? (12)
- size? (12)
- socket? (12)
- spawn (48)
- sticky? (12)
- symlink (12)
- symlink? (12)
- system (28)
- test (24)
- timeout (21)
- touch (12)
- uptodate? (12)
- writable? (12)
- zero? (12)
検索結果
先頭5件
-
FileUtils
. # compare _ file(file _ a , file _ b) -> bool (6358.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
JSON
. # load _ file!(filespec , opts = {}) -> object (6218.0) -
filespec で指定した JSON 形式のファイルを Ruby オブジェクトとしてロードして返します。
...
filespec で指定した JSON 形式のファイルを Ruby オブジェクトとしてロードして返します。
@param filespec ファイル名を指定します。
@param options オプションをハッシュで指定します。指定可能なオプションは JSON.#parse! と同様で... -
JSON
. # load _ file(filespec , opts = {}) -> object (6218.0) -
filespec で指定した JSON 形式のファイルを Ruby オブジェクトとしてロードして返します。
...
filespec で指定した JSON 形式のファイルを Ruby オブジェクトとしてロードして返します。
@param filespec ファイル名を指定します。
@param options オプションをハッシュで指定します。指定可能なオプションは JSON.#parse と同様で... -
ObjectSpace
. # allocation _ sourcefile(object) -> String (6119.0) -
objectの元となったソースファイル名を返します。
...rbというファイルで下記のスクリプトを実行した場合][ruby]{
require 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "file:#{ObjectSpace::allocation_sourcefile(obj)}" # => file:test.rb
ObjectSpace::trace_object_allocations_stop
//}
@see ObjectSpace... -
FileTest
. # identical?(file1 , file2) -> bool (3319.0) -
file1 と file2 が同じファイルを指している時に真を返します。 そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
...
file1 と file2 が同じファイルを指している時に真を返します。
そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
ruby 1.8.3 以前ではKernel.#test(?-, file1, file2)を使......p File.identical?("a", "a") #=> true
p File.identical?("a", "./a") #=> true
File.link("a", "b")
p File.identical?("a", "b") #=> true
File.symlink("a", "c")
p File.identical?("a", "c") #=> true
open("d", "w") {}
p File.identical?("a", "d") #=> false
@param file1......ァイル名を表す文字列か IO オブジェクトを指定します。
@param file2 ファイル名を表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file1, file2 が既に close されていた場合に発生します。... -
FileUtils
. # cmp(file _ a , file _ b) -> bool (3258.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
FileUtils
. # identical?(file _ a , file _ b) -> bool (3258.0) -
ファイル file_a と file_b の内容が同じなら真を返します。
...ファイル file_a と file_b の内容が同じなら真を返します。
@param file_a ファイル名。
@param file_b ファイル名。
//emlist[][ruby]{
require 'fileutils'
FileUtils.cmp('somefile', 'somefile') #=> true
FileUtils.cmp('/dev/null', '/dev/urandom') #=> false
//}... -
FileTest
. # grpowned?(file) -> bool (3132.0) -
ファイルのグループ ID がカレントプロセスの実効グループ ID と等しい時に真を返 します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
...ram file ファイル名を表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "")
File.chown(-1, Process.gid, "testfile")
FileTe......st.grpowned?("testfile") # => true
File.chown(-1, Process.gid + 10, "testfile")
FileTest.grpowned?("testfile") # => false
//}... -
FileTest
. # owned?(file) -> bool (3132.0) -
ファイルのユーザがカレントプロセスの実効ユーザと等しい時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
...ram file ファイル名を表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "")
File.chown(Process.uid, -1, "testfile")
FileTe......st.owned?("testfile") # => true
File.chown(501, -1, "testfile")
FileTest.owned?("testfile") # => false
//}...