lib/ztk/locator.rb in ztk-1.6.2 vs lib/ztk/locator.rb in ztk-1.6.3
- old
+ new
@@ -29,9 +29,22 @@
end
raise LocatorError, "Could not locate '#{File.join(args)}'!"
end
+ # Returns the root for the filesystem we are operating on. Ignores
+ # mount boundries on *nix.
+ #
+ # For all flavors of *nix this should always return "/".
+ #
+ # Windows should expect something similar to "C:\".
+ #
+ # @return [String] The root path of the file-system. For unix this should
+ # always be "/". For windows this should be something like "C:\".
+ def root
+ Dir.pwd.split(File::SEPARATOR).first
+ end
+
end
end
end