Class File
In: lib/backports/1.9.1/file.rb
lib/backports/1.9.3/file.rb
Parent: Object

Methods

Classes and Modules

Module File::Constants

Constants

NULL = case RUBY_PLATFORM

External Aliases

to_path -> self

Public Class methods

[Source]

    # File lib/backports/1.9.1/file.rb, line 26
26:       def open_with_options_hash(file, mode = nil, perm = Backports::Undefined, options = Backports::Undefined)
27:         mode, perm = Backports.combine_mode_perm_and_option(mode, perm, options)
28:         perm ||= 0666 # Avoid error on Rubinius, see issue #52
29:         if block_given?
30:           open_without_options_hash(file, mode, perm){|f| yield f}
31:         else
32:           open_without_options_hash(file, mode, perm)
33:         end
34:       end

Public Instance methods

[Source]

   # File lib/backports/1.9.1/file.rb, line 2
2:   def size
3:     stat.size
4:   end

[Validate]