HACKING ISSUES LICENSE NEWS README
Kgio DefaultWaiters File Pipe PipeMethods Socket SocketMethods TCPServer TCPSocket UNIXServer UNIXSocket

Methods

::tryopen

class Kgio::File

This subclass of the core File class adds the "tryopen" singleton method for opening files. A single "tryopen" and check for the return value may be used to avoid unnecessary stat(2) syscalls or File.open exceptions when checking for the existence of a file and opening it.

Public Class Methods

Kgio::File.tryopen(filename, [, mode [, perm]])      -> Kgio::File or Symbol source

Returns a Kgio::File object on a successful open. filename is a path to any file on the filesystem. If specified, mode is a bitmask of flags (see IO.sysopen) and perm should be an octal number.

This does not raise errors for most failures, but installs returns a Ruby symbol for the constant in the Errno::* namespace.

Common error symbols are:

See your open(2) manpage for more information on open(2) errors.

Parent: File

Included modules: mPipeMethods
Pages Classes Methods


mail archives: https://bogomips.org/kgio-public/
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.kgio 
	nntp://news.gmane.org/gmane.comp.lang.ruby.kgio.general 
public: kgio-public@bogomips.org / private: kgio@bogomips.org