Sha256: 23771f0abdefe2b80732f3fd15e220a30836d66fa40807cbeb7672f19210f08e

Contents?: true

Size: 219 Bytes

Versions: 10

Compression:

Stored size: 219 Bytes

Contents

module FileTest

  module_function

  # Is this the root directory?

  def root?(dir=nil)
    pth = File.expand_path(dir||work)
    return true if pth == '/'
    return true if pth =~ /^(\w:)?\/$/
    false
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
facets-2.0.1 lib/core/facets/filetest/root.rb
facets-2.0.0 lib/core/facets/filetest/root.rb
facets-2.0.2 lib/core/facets/filetest/root.rb
facets-2.0.4 lib/core/facets/filetest/root.rb
facets-2.1.0 lib/core/facets/filetest/root.rb
facets-2.1.2 lib/core/facets/filetest/root.rb
facets-2.1.1 lib/core/facets/filetest/root.rb
facets-2.0.5 lib/core/facets/filetest/root.rb
facets-2.0.3 lib/core/facets/filetest/root.rb
facets-2.1.3 lib/core/facets/filetest/root.rb