Class: Swineherd::LocalFS

Inherits:
Object
  • Object
show all
Defined in:
lib/swineherd/filesystem/localfs.rb

Class Method Summary collapse

Class Method Details

.check_paths(paths) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/swineherd/filesystem/localfs.rb', line 3

def self.check_paths paths
  exist_count   = 0 # no outputs exist
  paths.each{|path| exist_count += 1 if File.exist?(path) }
  raise "Indeterminate output state" if (exist_count > 0) && (exist_count < paths.size)
  return true if exist_count == 0
  false
end