FileTest
ruby/spec describes 28 methods in core/filetest, and Metorex implements 27 of them. The parameters are what Method#parameters answers under Metorex.
File#
File.file?: implemented, parameters[[:req, :args]]. Returnstrueif the namedfileexists and is a regular file. An example calling it.
FileTest#
FileTest.blockdev?: implemented, parameters[[:req, :path]]. Returnstrueiffilepathpoints to a block device,falseotherwise: An example calling it.FileTest.chardev?: implemented, parameters[[:req, :path]]. Returnstrueiffilepathpoints to a character device,falseotherwise. An example calling it.FileTest.directory?: implemented, parameters[[:req, :path]]. With stringobjectgiven, returnstrueifpathis a string path leading to a directory, or to a symbolic link to a directory;falseotherwise: An example calling it.FileTest.empty?: implemented, parameters[[:req, :path]]. Returnstrueif the named file exists and has a zero size. An example calling it.FileTest.executable?: implemented, parameters[[:req, :path]]. Returnstrueif the named file is executable by the effective user and group id of this process. An example calling it.FileTest.executable_real?: implemented, parameters[[:req, :path]]. Returnstrueif the named file is executable by the real user and group id of this process. An example calling it.FileTest.exist?: implemented, parameters[[:req, :path]]. Returntrueif the named file exists. An example calling it.FileTest.exists?: not implemented.FileTest.file?: implemented, parameters[[:req, :path]]. Returnstrueif the namedfileexists and is a regular file. An example calling it.FileTest.grpowned?: implemented, parameters[[:req, :path]]. Returnstrueif the named file exists and the effective group id of the calling process is the owner of the file. An example calling it.FileTest.identical?: implemented, parameters[[:req, :path], [:req, :other]]. Returnstrueif the named files are identical. An example calling it.FileTest.owned?: implemented, parameters[[:req, :path]]. Returnstrueif the named file exists and the effective user id of the calling process is the owner of the file. An example calling it.FileTest.pipe?: implemented, parameters[[:req, :path]]. Returnstrueiffilepathpoints to a pipe,falseotherwise: An example calling it.FileTest.readable?: implemented, parameters[[:req, :path]]. Returnstrueif the named file is readable by the effective user and group id of this process. An example calling it.FileTest.readable_real?: implemented, parameters[[:req, :path]]. Returnstrueif the named file is readable by the real user and group id of this process. An example calling it.FileTest.setgid?: implemented, parameters[[:req, :path]]. Returnstrueif the named file has the setgid bit set. An example calling it.FileTest.setuid?: implemented, parameters[[:req, :path]]. Returnstrueif the named file has the setuid bit set. An example calling it.FileTest.size: implemented, parameters[[:req, :path]]. Returns the size offile_name. An example calling it.FileTest.size?: implemented, parameters[[:req, :path]]. Returnsniliffile_namedoesn't exist or has zero size, the size of the file otherwise. An example calling it.FileTest.socket?: implemented, parameters[[:req, :path]]. Returnstrueiffilepathpoints to a socket,falseotherwise: An example calling it.FileTest.sticky?: implemented, parameters[[:req, :path]]. Returnstrueif the named file has the sticky bit set. An example calling it.FileTest.symlink?: implemented, parameters[[:req, :path]]. Returnstrueiffilepathpoints to a symbolic link,falseotherwise: An example calling it.FileTest.world_readable?: implemented, parameters[[:req, :path]]. If file_name is readable by others, returns an integer representing the file permission bits of file_name. An example calling it.FileTest.world_writable?: implemented, parameters[[:req, :path]]. If file_name is writable by others, returns an integer representing the file permission bits of file_name. An example calling it.FileTest.writable?: implemented, parameters[[:req, :path]]. Returnstrueif the named file is writable by the effective user and group id of this process. An example calling it.FileTest.writable_real?: implemented, parameters[[:req, :path]]. Returnstrueif the named file is writable by the real user and group id of this process. An example calling it.FileTest.zero?: implemented, parameters[[:req, :path]]. Returnstrueif the named file exists and has a zero size. An example calling it.
The method summaries are the first sentences of Ruby's own documentation for each method, read from MRI 4.0.6's ri data. Ruby's documentation is distributed under Ruby's license.