Website hosting service by Active-Venture.com
 

 Back to Index

prev - up - next - index

FileTest

FileTest is the collection of the file test functions. It can be used for inclusion.

Module Functions:

blockdev?(file)

Returns true if the file specified by the file is the block special file.

chardev?(file)

Returns true if the file specified by the file is the character special file.

executable?(filename)

Returns true if the file specified by the filename is executable by the effective user/group id.

executable_real?(filename)

Returns true if the file specified by the filename is executable by the real user/group id.

exist?(file)

Returns true if the file specified by the file exists.

grpowned?(file)

Returns true if the file specified by the file has gid of effective group.

directory?(file)

Returns true if the file specified by the file is a directory.

file?(file)

Returns true if the file specified by the file is a regular file.

pipe?(file)

Returns true if the file specified by the file is a named pipe (FIFO).

socket?(file)

Returns true if the file specified by the file is a socket.

owned?(file)

Returns true if the file specified by the file is owned by you.

readable?(filename)

Returns true if the file specified by the filename is readable by you.

readable_real?(filename)

Returns true if the file specified by the filename is readable by your real uid/gid.

setuid?(file)

Returns true if the setuid bit of the file specified by the file is set.

setgid?(file)

Returns true if the setgid bit of the file specified by the file is set.

size?(file)

Returns the size of the file specified by the file. Returns nil if it does not exist or is empty.

sticky?(file)

Returns true if the sticky bit of the file specified by the file is set.

symlink?(file)

Returns true if the file specified by the file is a symbolic link.

writable?(filename)

Returns true if the file specified by the filename is writable by you.

writable_real?(filename)

Returns true if the file specified by the filename is writable by your real uid/gid.

zero?(file)

Returns true if the file specified by the file exists, and the size of the file is 0.


prev - up - next - index

matz@netlab.co.jp

 

  

 

 

2002-2004 Active-Venture.com Website Hosting Service

 
Buy domain name at only $5.95/yr with comprehensive domain hosting services. Domain registration and domain search service from $5.95 Cheap domain name registration and domain transfer service
 

Disclaimer: This documentation is provided only for the benefits of our website hosting customers.
For authoritative source of the documentation, please refer to http://www.ruby-doc.org/docs/