X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fcommon%2Ffilesystem.rb;h=0c80b59e55f98488a118faf5251e8b1a372af551;hp=b44e52ce3979506a82155a9db9ac658257c6b19a;hb=df4e02ebf6a4e28a58abcb298a4442a245ad0b15;hpb=aebdf12adce2766e2957f88916fcae6374d4eb4b diff --git a/lib/common/filesystem.rb b/lib/common/filesystem.rb index b44e52c..0c80b59 100644 --- a/lib/common/filesystem.rb +++ b/lib/common/filesystem.rb @@ -1,8 +1,8 @@ +# 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?). +# 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). @@ -26,6 +26,7 @@ class Filesystem # def self.get_subdirs(dir) subdirs = [] + return subdirs if not File.directory?(dir) Dir.open(dir) do |d| d.each do |entry|