ライブラリ
- ビルトイン (2721)
モジュール
- FileTest (292)
- Kernel (1109)
- Marshal (44)
- Math (297)
- ObjectSpace (110)
- Process (418)
-
Process
:: GID (121) -
Process
:: Sys (165) -
Process
:: UID (121) - Signal (44)
キーワード
- Array (11)
- Complex (22)
- Float (11)
- Hash (11)
- Integer (11)
- Rational (11)
- String (11)
-
_ _ callee _ _ (11) -
_ _ dir _ _ (11) -
_ _ method _ _ (11) -
_ id2ref (11) - ` (11)
- abort (22)
- acos (11)
- acosh (11)
- argv0 (11)
- asin (11)
- asinh (11)
-
at
_ exit (11) - atan (11)
- atan2 (11)
- atanh (11)
- autoload (11)
- autoload? (11)
- binding (11)
-
block
_ given? (11) - blockdev? (11)
- caller (33)
-
caller
_ locations (22) - catch (22)
- cbrt (11)
-
change
_ privilege (22) - chardev? (11)
- chomp (11)
- chop (11)
-
clock
_ gettime (11) - cos (11)
- cosh (11)
-
count
_ objects (11) - daemon (11)
-
define
_ finalizer (22) - detach (11)
- directory? (11)
- dump (22)
-
each
_ object (44) - egid (11)
- egid= (11)
- eid (22)
- eid= (22)
- empty? (8)
- erf (11)
- erfc (11)
- euid (11)
- euid= (11)
- eval (22)
- exec (44)
- executable? (11)
-
executable
_ real? (11) - exist? (11)
- exists? (9)
- exit (11)
- exit! (11)
- exp (11)
- fail (33)
- file? (11)
- fork (22)
- format (11)
- frexp (11)
-
from
_ name (22) - gamma (11)
-
garbage
_ collect (11) - getegid (11)
- geteuid (11)
- getgid (11)
- getpgid (11)
- getpgrp (11)
- getpriority (11)
- getrlimit (11)
- gets (11)
- getsid (11)
- getuid (11)
- gid (11)
- gid= (11)
-
global
_ variables (11) -
grant
_ privilege (22) - groups (11)
- groups= (11)
- grpowned? (11)
- gsub (33)
- hypot (11)
- identical? (11)
- initgroups (11)
- issetugid (11)
- iterator? (11)
- kill (11)
- lambda (17)
- ldexp (11)
- lgamma (11)
- list (11)
- load (22)
-
local
_ variables (11) - log (22)
- log10 (11)
- log2 (11)
- loop (22)
- maxgroups (11)
- maxgroups= (11)
- open (22)
- owned? (11)
- p (11)
- pid (11)
- pipe? (11)
- pp (7)
- ppid (11)
- print (11)
- printf (22)
- proc (18)
- putc (11)
- puts (11)
- raise (33)
- rand (22)
-
re
_ exchange (22) -
re
_ exchangeable? (22) - readable? (11)
-
readable
_ real? (11) - readline (11)
- readlines (11)
- require (11)
-
require
_ relative (11) - restore (11)
- rid (22)
- select (11)
-
set
_ trace _ func (11) - setegid (11)
- seteuid (11)
- setgid (11)
- setgid? (11)
- setpgid (11)
- setpgrp (11)
- setpriority (11)
- setproctitle (11)
- setregid (11)
- setresgid (11)
- setresuid (11)
- setreuid (11)
- setrgid (11)
- setrlimit (22)
- setruid (11)
- setsid (11)
- setuid (11)
- setuid? (11)
-
sid
_ available? (22) - signame (11)
- sin (11)
- sinh (11)
- size (11)
- size? (11)
- sleep (22)
- socket? (11)
- spawn (44)
- sprintf (11)
- sqrt (11)
- srand (22)
- sticky? (11)
- sub (22)
- switch (44)
- symlink? (11)
- syscall (11)
- system (44)
- tan (11)
- tanh (11)
- test (22)
- throw (11)
- times (11)
-
trace
_ var (33) - trap (44)
- uid (11)
- uid= (11)
-
undefine
_ finalizer (11) -
untrace
_ var (11) - wait (11)
- wait2 (11)
- waitall (11)
- waitpid (11)
- waitpid2 (11)
- warn (11)
-
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - zero? (11)
検索結果
先頭5件
-
FileTest
. # grpowned?(file) -> bool (8001.0) -
ファイルのグループ ID がカレントプロセスの実効グループ ID と等しい時に真を返 します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
ファイルのグループ ID がカレントプロセスの実効グループ ID と等しい時に真を返
します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "")
File.chown(-1, Process.gid, "testfile")
FileT... -
FileTest
. # identical?(file1 , file2) -> bool (8001.0) -
file1 と file2 が同じファイルを指している時に真を返します。 そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
file1 と file2 が同じファイルを指している時に真を返します。
そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
ruby 1.8.3 以前ではKernel.#test(?-, file1, file2)を使ってください。
open("a", "w") {}
p File.identical?("a", "a") #=> true
p File.identical?("a", "./a") #=> true
File.link("a", "b")
p File.identical... -
FileTest
. # owned?(file) -> bool (8001.0) -
ファイルのユーザがカレントプロセスの実効ユーザと等しい時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
ファイルのユーザがカレントプロセスの実効ユーザと等しい時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "")
File.chown(Process.uid, -1, "testfile")
FileTest.owned?(... -
FileTest
. # pipe?(file) -> bool (8001.0) -
指定したファイルがパイプである時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
指定したファイルがパイプである時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
例:
r, w = IO.pipe
FileTest.pipe?(r) # => true
FileTest.pipe?(w) # => true -
FileTest
. # readable?(file) -> bool (8001.0) -
ファイルがカレントプロセスにより読み込み可能な時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
ファイルがカレントプロセスにより読み込み可能な時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列を指定します。
//emlist[例][ruby]{
IO.write("testfile", "")
File.chmod(0644, "testfile")
FileTest.readable?("testfile") # => true
File.chmod(0200, "testfile")
FileTest.readable?("testfile"... -
FileTest
. # readable _ real?(file) -> bool (8001.0) -
ファイルがカレントプロセスの実ユーザか実グループによって読み込み可能な時に真を 返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
ファイルがカレントプロセスの実ユーザか実グループによって読み込み可能な時に真を
返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable? -
FileTest
. # setgid?(file) -> bool (8001.0) -
ファイルが setgid(2) されている時に真を返 します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
ファイルが setgid(2) されている時に真を返
します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
//emlist[例][ruby]{
require 'fileutils'
IO.write("testfile", "")
FileUtils.chmod("g+s", "testfile")
FileTest.setgid?("testfile") # => true
FileUtils.chmod("g-s", "... -
FileTest
. # setuid?(file) -> bool (8001.0) -
ファイルが setuid(2) されている時に真を返 します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
ファイルが setuid(2) されている時に真を返
します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
require 'fileutils'
IO.write("testfile", "")
FileUtils.chmod("u+s", "testfile")
FileTe... -
FileTest
. # size(file) -> Integer (8001.0) -
ファイルのサイズを返します。
ファイルのサイズを返します。
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX file が存在しない場合、あるいはシステムコールに失敗した場合に発生します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
@see FileTest.#size?, FileTest.#zero?
例:
FileTest.size('/etc/passwd') # => 5925 -
FileTest
. # size?(file) -> Integer | nil (8001.0) -
ファイルのサイズを返します。ファイルが存在しない時や ファイルのサイズが0の時には nil を返します。
ファイルのサイズを返します。ファイルが存在しない時や
ファイルのサイズが0の時には nil を返します。
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "test")
FileTest.size?("testfile") # => 4
File.delete("testfile")
FileTest.size?("testfile") ...