+# Convenience methods for working with the filesystem. This class
+# only provides static methods, to be used analogously to the File
+# class (for example, <tt>File.directory?</tt>).
+#
class Filesystem
- # Convenience methods for working with the filesystem. This class
- # only provides static methods, to be used analogously to the File
- # class (for example, File.directory?).
-
# Return whether or not the given path begins with a dot (ASCII
# period).
#
def self.get_subdirs(dir)
subdirs = []
+ return subdirs if not File.directory?(dir)
Dir.open(dir) do |d|
d.each do |entry|