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