Sha256: 1e6f1dab9c7097920d90d2bb5ed45b24b4914d6e93e0a981e1b281f4a03d5271
Contents?: true
Size: 272 Bytes
Versions: 20
Compression:
Stored size: 272 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
20 entries across 19 versions & 2 rubygems