Returns true if the rio represents an absolute path or URI. Alias for #absolute?
rio('/tmp').abs? # >> true
rio('.ssh').abs? # >> false
rio('file:///tmp').abs? # >> true
rio('http://www.ruby-doc.org/').abs? # >> true
# File lib/rio/if/test.rb, line 259 259: def abs?() target.abs?() end
Returns true if the Rio represents and absolute path or URI. Calls URI#absolute?
rio('/tmp').absolute? # >> true
rio('.ssh').absolute? # >> false
rio('file:///tmp').absolute? # >> true
rio('http://www.ruby-doc.org/').absolute? # >> true
# File lib/rio/if/test.rb, line 269 269: def absolute?() target.absolute?() end
Calls File#atime
Returns the last access time (a Time object) for the file system object referenced
# File lib/rio/if/test.rb, line 159 159: def atime(*args) target.atime(*args) end
Calls FileTest#blockdev?
rio('afile').blockdev? => true or false
Returns true if the named file is a block device.
# File lib/rio/if/test.rb, line 56 56: def blockdev?() target.blockdev?() end
Calls FileTest#chardev?
rio('afile').chardev? => true or false
Returns true if the named file is a character device.
# File lib/rio/if/test.rb, line 61 61: def chardev?() target.chardev? end
Calls IO#closed?
ario.closed? => true or false
Returns true if ario is completely closed (for duplex streams, both reader and writer), false otherwise.
# File lib/rio/if/test.rb, line 98 98: def closed?() target.closed?() end
Calls File#ctime
Returns the change time for Rios that reference file system object (that is, the time directory information about the file was changed, not the file itself).
# File lib/rio/if/test.rb, line 165 165: def ctime(*args) target.ctime(*args) end
Alias for #directory?
# File lib/rio/if/test.rb, line 69 69: def dir?() target.dir? end
Calls FileTest#directory?
rio('afile').directory? => true or false
Returns true if the named file is a directory, false otherwise.
# File lib/rio/if/test.rb, line 66 66: def directory?() target.directory? end
Calls File#executable?
Returns true if the file is executable by the effective user id of this process.
# File lib/rio/if/test.rb, line 175 175: def executable?(*args) target.executable?(*args) end
Calls File#executable_real?
Returns true if the file is executable by the real user id of this process.
# File lib/rio/if/test.rb, line 180 180: def executable_real?(*args) target.executable_real?(*args) end
Calls FileTest#exist?
rio('afile').exist?() => true or false
Returns true if the named file exists.
# File lib/rio/if/test.rb, line 74 74: def exist?() target.exist? end
Calls FileTest#file?
rio('afile').file? => true or false
Returns true if the named file exists and is a regular file.
# File lib/rio/if/test.rb, line 79 79: def file?() target.file? end
Calls File#fnmatch?
Returns true if #path matches pattern. The pattern is not a regular expression; instead it follows rules similar to shell filename globbing. It may contain the following metacharacters:
flags is a bitwise OR of the FNM_xxx parameters. The same glob pattern and flags are used by Dir::glob.
rio('cat').fnmatch?('cat') #=> true
rio('category').fnmatch?('cat') #=> false
rio('cats').fnmatch?('c{at,ub}s') #=> false
rio('cubs').fnmatch?('c{at,ub}s') #=> false
rio('cat').fnmatch?('c{at,ub}s') #=> false
rio('cat').fnmatch?('c?t') #=> true
rio('cat').fnmatch?('c\?t') #=> false
rio('cat').fnmatch?('c??t') #=> false
rio('cats').fnmatch?('c*') #=> true
rio('cat').fnmatch?('c*t') #=> true
rio('cat').fnmatch?('c\at') #=> true
rio('cat').fnmatch?('c\at',File::FNM_NOESCAPE) #=> false
rio('a/b').fnmatch?('a?b') #=> true
rio('a/b').fnmatch?('a?b',File::FNM_PATHNAME) #=> false
rio('.profile').fnmatch?('*') #=> false
rio('.profile').fnmatch?('*',File::FNM_DOTMATCH) #=> true
rio('dave/.profile').fnmatch?('*') #=> true
rio('dave/.profile').fnmatch?('*',File::FNM_DOTMATCH) #=> true
rio('dave/.profile').fnmatch?('*',File::FNM_PATHNAME) #=> false
# File lib/rio/if/test.rb, line 136 136: def fnmatch?(*args) target.fnmatch?(*args) end
Calls File#ftype
Identifies the type of the named file; the return string is one of ‘file�, ‘directory�, ‘characterSpecial�, ‘blockSpecial�, ‘fifo�, ‘link�, ‘socket�, or ‘unknown�.
# File lib/rio/if/test.rb, line 142 142: def ftype(*args) target.ftype(*args) end
Calls FileTest#grpowned?
rio('afile').grpowned? => true or false
Returns true if the named file exists and the effective group id of the calling process is the owner of the file. Returns false on Windows.
# File lib/rio/if/test.rb, line 222 222: def grpowned?(*args) target.grpowned?(*args) end
Calls File#lstat
# File lib/rio/if/test.rb, line 148 148: def lstat(*args) target.lstat(*args) end
Calls Pathname#mountpoint?
Returns true if self points to a mountpoint.
# File lib/rio/if/test.rb, line 274 274: def mountpoint?() target.mountpoint?() end
Calls File#mtime
Returns the modification time for Rio that reference file system objects
# File lib/rio/if/test.rb, line 170 170: def mtime(*args) target.mtime(*args) end
Calls FileTest#owned?
rio('afile').owned? => true or false
Returns true if the named file exists and the effective used id of the calling process is the owner of the file.
# File lib/rio/if/test.rb, line 215 215: def owned?(*args) target.owned?(*args) end
Calls FileTest#pipe?
rio('afile').pipe? => true or false
Returns true if the named file is a pipe.
# File lib/rio/if/test.rb, line 153 153: def pipe?() target.pipe?() end
Calls FileTest#readable?
rio('afile').readable? => true or false
Returns true if the named file is readable by the effective user
id of this process.
# File lib/rio/if/test.rb, line 186 186: def readable?(*args) target.readable?(*args) end
Calls FileTest#readable_real?
rio('afile').readable_real? => true or false
Returns true if the named file is readable by the real user id of this process.
# File lib/rio/if/test.rb, line 192 192: def readable_real?(*args) target.readable_real?(*args) end
Calls Pathname#root?
#root? is a predicate for root directories. I.e. it returns true if the pathname consists of consecutive slashes.
It doesn’t access the actual filesystem. So it may return false for some pathnames which points to roots such as /usr/...
# File lib/rio/if/test.rb, line 284 284: def root?() target.root?() end
Calls FileTest#setgid?
rio('afile').setgid? => true or false
Returns true if the named file is a has the setgid bit set.
# File lib/rio/if/test.rb, line 227 227: def setgid?(*args) target.setgid?(*args) end
Calls FileTest#setuid?
rio('afile').setuid? => true or false
Returns true if the named file is a has the setuid bit set.
# File lib/rio/if/test.rb, line 232 232: def setuid?(*args) target.setuid?(*args) end
Calls FileTest#size
rio('afile').size => integer
Returns the size of afile. To get the length of the Rio’s string representation use Rio#length
# File lib/rio/if/test.rb, line 238 238: def size(*args) target.size(*args) end
Calls FileTest#size?
rio('afile').size? => integer or nil
Returns nil if afile doesn’t exist or has zero size, the size of the file otherwise.
# File lib/rio/if/test.rb, line 244 244: def size?(*args) target.size?(*args) end
Calls FileTest#socket?
rio('afile').socket? => true or false
Returns true if the named file is a socket.
# File lib/rio/if/test.rb, line 84 84: def socket?() target.socket? end
Calls File#stat
# File lib/rio/if/test.rb, line 145 145: def stat(*args) target.stat(*args) end
Calls FileTest#sticky?
rio('afile').sticky? => true or false
Returns true if the named file is a has the sticky bit set.
# File lib/rio/if/test.rb, line 209 209: def sticky?(*args) target.sticky?(*args) end
Calls FileTest#symlink?
rio('afile').symlink? => true or false
Returns true if the named file is a symbolic link.
# File lib/rio/if/test.rb, line 89 89: def symlink?() target.symlink? end
Calls FileTest#writable?
rio('afile').writable? => true or false
Returns true if the named file is writable by the effective user id of this process.
# File lib/rio/if/test.rb, line 198 198: def writable?(*args) target.writable?(*args) end
Copyright © 2005,2006,2007,2008,2009,2010 Christopher Kleckner. All rights reserved.