Class: File

Inherits:
Object
  • Object
show all
Defined in:
lib/setup/core_ext.rb

Overview

Is this needed any more?

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dir?(path) ⇒ Boolean

for corrupted Window’s stat(2)

Returns:

  • (Boolean)


17
18
19
# File 'lib/setup/core_ext.rb', line 17

def dir?(path)
  directory?((path[-1,1] == '/') ? path : path + '/')
end

Instance Method Details

#read(fname) ⇒ Object



10
11
12
# File 'lib/setup/core_ext.rb', line 10

def read(fname)
  open(fname){ |f| return f.read }
end