Sha256: fe56b5f00eb26c1a42caa07b29bd6f4146629db9494d4baf05984465c1da95ca
Contents?: true
Size: 273 Bytes
Versions: 3
Compression:
Stored size: 273 Bytes
Contents
module FileTest module_function # Is the specified directory the root directory? # # CREDIT: Jeffrey Schwab def root?(dir=nil) pth = File.expand_path(dir||Dir.pwd) return true if pth == '/' return true if pth =~ /^(\w:)?\/$/ false end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-2.2.0 | lib/core/facets/filetest/root.rb |
facets-2.2.1 | lib/core/facets/filetest/root.rb |
facets-2.3.0 | lib/core/facets/filetest/root.rb |