Logs a message
at the error (syslog warning) log level, or logs the message returned from the block.
Same as IO
.
Same as IO
.
Returns the number of native file system blocks allocated for this file, or nil
if the operating system doesn’t support this feature.
File.stat("testfile").blocks #=> 2
Returns true
if stat is a zero-length file; false
otherwise.
File.stat("testfile").zero? #=> false
Returns true
if stat is a socket, false
if it isn’t or if the operating system doesn’t support this feature.
File.stat("testfile").socket? #=> false
Returns true
if the file is a block device, false
if it isn’t or if the operating system doesn’t support this feature.
File.stat("testfile").blockdev? #=> false File.stat("/dev/hda1").blockdev? #=> true
Wakes up all threads waiting for this lock.
Sends a LOCK request to the path
and gets a response, as an HTTPResponse
object.
Sends a UNLOCK request to the path
and gets a response, as an HTTPResponse
object.
Sends the GETQUOTAROOT command along with the specified mailbox
. This command is generally available to both admin and user. If this mailbox exists, it returns an array containing objects of type Net::IMAP::MailboxQuotaRoot
and Net::IMAP::MailboxQuota
.
Inserts switch
at the head of the list, and associates short, long and negated long options. Arguments are:
switch
OptionParser::Switch
instance to be inserted.
short_opts
List
of short style options.
long_opts
List
of long style options.
nolong_opts
List
of long style options with “no-” prefix.
prepend(switch, short_opts, long_opts, nolong_opts)
Opens a block for grouping objects to be pretty printed.
Arguments:
indent
- noop argument. Present for compatibility.
open_obj
- text appended before the &blok. Default is ”
close_obj
- text appended after the &blok. Default is ”
open_width
- noop argument. Present for compatibility.
close_width
- noop argument. Present for compatibility.
Returns the namespace of the attribute.
e = Element.new( "elns:myelement" ) e.add_attribute( "nsa:a", "aval" ) e.add_attribute( "b", "bval" ) e.attributes.get_attribute( "a" ).prefix # -> "nsa" e.attributes.get_attribute( "b" ).prefix # -> "elns" a = Attribute.new( "x", "y" ) a.prefix # -> ""
the document this child belongs to, or nil if this child
belongs to no document
@return the root Element
of the document, or nil if this document has no children.
@return the DocType
child of the document, if one exists, and nil otherwise.