Class: File
Class Method Summary collapse
Instance Method Summary collapse
- #absolute_path ⇒ Object
- #basename(*args) ⇒ Object
- #dirname ⇒ Object
- #executable? ⇒ Boolean
- #readable? ⇒ Boolean
- #relative_path ⇒ Object
- #writable? ⇒ Boolean
Class Method Details
.absolute_path(path) ⇒ Object
9 10 11 |
# File 'lib/ext/file.rb', line 9 def self.absolute_path(path) Dir.absolute_path(path) end |
.relative_path(abs_path, pwd = Dir.pwd) ⇒ Object
5 6 7 |
# File 'lib/ext/file.rb', line 5 def self.relative_path(abs_path, pwd=Dir.pwd) Dir.relative_path(abs_path, pwd) end |
Instance Method Details
#absolute_path ⇒ Object
17 18 19 |
# File 'lib/ext/file.rb', line 17 def absolute_path Dir.absolute_path(self.path) end |
#basename(*args) ⇒ Object
25 26 27 |
# File 'lib/ext/file.rb', line 25 def basename(*args) File.basename(self.path, *args) end |
#dirname ⇒ Object
21 22 23 |
# File 'lib/ext/file.rb', line 21 def dirname File.dirname(self.path) end |
#executable? ⇒ Boolean
37 38 39 |
# File 'lib/ext/file.rb', line 37 def executable? File.executable?(self.path) end |
#readable? ⇒ Boolean
33 34 35 |
# File 'lib/ext/file.rb', line 33 def readable? File.readable?(self.path) end |
#relative_path ⇒ Object
13 14 15 |
# File 'lib/ext/file.rb', line 13 def relative_path Dir.relative_path(self.path) end |