123456789_123456789_123456789_123456789_123456789_

Module: FileTest

Relationships & Source Files
Defined in: file.c,
dir.c

Overview

FileTest implements file test operations similar to those used in ::File::Stat. It exists as a standalone module, and its methods are also insinuated into the ::File class. (Note that this is not done by inclusion: the interpreter cheats).

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#directory?(file_name) ⇒ Boolean (readonly)

Alias for File.directory?. Returns true if the named file is a directory, false otherwise.

Instance Method Details

#blockdev?(file_name) ⇒ Boolean

Alias for File.blockdev?.

#chardev?(file_name) ⇒ Boolean

Alias for File.chardev?.

#empty?(file_name) ⇒ Boolean

Alias for File.empty?. Returns true if the named file exists and has a zero size.

file_name can be an ::IO object.

#executable?(file_name) ⇒ Boolean

Alias for File.executable?.

#executable_real?(file_name) ⇒ Boolean

#exist?(file_name) ⇒ Boolean

Alias for File.exist?.

#exists?(file_name) ⇒ Boolean

Alias for File.exists?.

#file?(file) ⇒ Boolean

Alias for File.file?.

#grpowned?(file_name) ⇒ Boolean

Alias for File.grpowned?.

#identical?(file_1, file_2) ⇒ Boolean

Alias for File.identical?.

#owned?(file_name) ⇒ Boolean

Alias for File.owned?.

#pipe?(file_name) ⇒ Boolean

Alias for File.pipe?.

#readable?(file_name) ⇒ Boolean

Alias for File.readable?.

#readable_real?(file_name) ⇒ Boolean

Alias for File.readable_real?.

#setgid?(file_name) ⇒ Boolean

Alias for File.setgid?.

#setuid?(file_name) ⇒ Boolean

Alias for File.setuid?.

#size(file_name) ⇒ Integer

Alias for File.size.

#size?(file_name) ⇒ Integer?

Alias for File.size?.

#socket?(file_name) ⇒ Boolean

Alias for File.socket?.

#sticky?(file_name) ⇒ Boolean

Alias for File.sticky?.

#symlink?(file_name) ⇒ Boolean

Alias for File.symlink?.

#world_readable?(file_name) ⇒ Integer?

#world_writable?(file_name) ⇒ Integer?

#writable?(file_name) ⇒ Boolean

Alias for File.writable?.

#writable_real?(file_name) ⇒ Boolean

Alias for File.writable_real?.

#zero?(file_name) ⇒ Boolean

Alias for File.zero?.