Method: JDC::App::Files#files

Defined in:
lib/jdc/cli/app/files.rb

#filesObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/jdc/cli/app/files.rb', line 42

def files
  app = input[:app]
  path = input[:path]

  if quiet?
    files =
      with_progress("Getting file listing") do
        app.files(*path.split("/"))
      end

    files.each do |file|
      line file.join("/")
    end
  else
    invoke :file, :app => app, :path => path
  end
rescue JFoundry::NotFound
  fail "Invalid path #{b(path)} for app #{b(app.name)}"
rescue JFoundry::FileError => e
  fail e.description
end