Classes

Methods

Files

In Files

Modules

Namespaces

Files

  • README

Class Index

  • RIO
  • RIO::Doc
  • RIO::Doc::EXAMPLES
  • RIO::Doc::HOWTO
  • RIO::Doc::INDEX
  • RIO::Doc::INTRO
  • RIO::Doc::OPTIONAL
  • RIO::Doc::SYNOPSIS
  • RIO::IF
  • RIO::IF::CSV
  • RIO::IF::Dir
  • RIO::IF::File
  • RIO::IF::FileOrDir
  • RIO::IF::Grande
  • RIO::IF::GrandeEntry
  • RIO::IF::GrandeStream
  • RIO::IF::Path
  • RIO::IF::RubyIO
  • RIO::IF::String
  • RIO::IF::Test
  • RIO::IF::YAML
  • RIO::Rio
  • Kernel
No matching classes.

Methods

  • #abs?
  • #absolute?
  • #atime
  • #blockdev?
  • #chardev?
  • #closed?
  • #ctime
  • #dir?
  • #directory?
  • #executable?
  • #executable_real?
  • #exist?
  • #file?
  • #fnmatch?
  • #ftype
  • #grpowned?
  • #lstat
  • #mountpoint?
  • #mtime
  • #open?
  • #owned?
  • #pipe?
  • #readable?
  • #readable_real?
  • #root?
  • #setgid?
  • #setuid?
  • #size
  • #size?
  • #socket?
  • #stat
  • #sticky?
  • #symlink?
  • #writable?
  • #writable_real?
  • #zero?

In Files

  • lib/rio/if/test.rb
module

RIO::IF::Test

rel_prefix: (../..)

Public Instance Methods

abs?() click to toggle source

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
		      
absolute?() click to toggle source

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
		      
atime(*args) click to toggle source

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
		      
blockdev?() click to toggle source

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
		      
chardev?() click to toggle source

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
		      
closed?() click to toggle source

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
		      
ctime(*args) click to toggle source

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
		      
dir?() click to toggle source

Alias for #directory?

			    # File lib/rio/if/test.rb, line 69
69:       def dir?() target.dir? end
		      
directory?() click to toggle source

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
		      
executable?(*args) click to toggle source

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
		      
executable_real?(*args) click to toggle source

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
		      
exist?() click to toggle source

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
		      
file?() click to toggle source

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
		      
fnmatch?( pattern, [flags] ) => (true or false) click to toggle source

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
		      
ftype(*args) click to toggle source

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
		      
grpowned?(*args) click to toggle source

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
		      
lstat(*args) click to toggle source

Calls File#lstat

			     # File lib/rio/if/test.rb, line 148
148:       def lstat(*args) target.lstat(*args) end
		      
mountpoint?() click to toggle source

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
		      
mtime(*args) click to toggle source

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
		      
open?() click to toggle source

Returns true if a Rio is not #closed?

			    # File lib/rio/if/test.rb, line 92
92:       def open?() target.open?() end
		      
owned?(*args) click to toggle source

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
		      
pipe?() click to toggle source

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
		      
readable?(*args) click to toggle source

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
		      
readable_real?(*args) click to toggle source

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
		      
root?() click to toggle source

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
		      
setgid?(*args) click to toggle source

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
		      
setuid?(*args) click to toggle source

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
		      
size(*args) click to toggle source

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
		      
size?(*args) click to toggle source

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
		      
socket?() click to toggle source

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
		      
stat(*args) click to toggle source

Calls File#stat

			     # File lib/rio/if/test.rb, line 145
145:       def stat(*args) target.stat(*args) end
		      
sticky?(*args) click to toggle source

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
		      
symlink?() click to toggle source

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
		      
writable?(*args) click to toggle source

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
		      
writable_real?(*args) click to toggle source

Calls FileTest#writable_real?

 rio('afile').writable_real?     => true or false

Returns true if the named file is writable by the real user id of this process.

			     # File lib/rio/if/test.rb, line 204
204:       def writable_real?(*args) target.writable_real?(*args) end
		      
zero?(*args) click to toggle source

Calls FileTest#zero?

 rio('afile').zero?     => true or false

Returns true if the named file exists and has a zero size.

			     # File lib/rio/if/test.rb, line 249
249:       def zero?(*args) target.zero?(*args) end
		      

Copyright © 2005,2006,2007,2008,2009,2010 Christopher Kleckner. All rights reserved.