Method: IRODS4r::ICommands.ls

Defined in:
lib/irods4r/icommands.rb

.ls(path, ticket = nil) ⇒ Object

Return the list of files found at ‘path’.



12
13
14
15
16
17
18
19
# File 'lib/irods4r/icommands.rb', line 12

def self.ls(path, ticket = nil)
  r = `ils #{"-t #{ticket}" if ticket} #{path}`
  #raise ICommandException.new($?) unless $?.exitstatus == 0
  if r.empty?
    raise NotFoundException.new("Can't find resource '#{path}'")
  end
  r.lines
end