Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- lib/core_ext/file.rb
Class Method Summary collapse
-
.absolute_path?(path) ⇒ Boolean
determine whether a String path is absolute.
Class Method Details
.absolute_path?(path) ⇒ Boolean
determine whether a String path is absolute.
14 15 16 |
# File 'lib/core_ext/file.rb', line 14 def self.absolute_path?(path) false | File.dirname(path)[/\A([A-Z]:)?#{Regexp.escape(File::SEPARATOR)}/i] end |