list(*args)
public
Returns an array of file information in the directory (the output is like
`ls -l`). If a block is given, it iterates
through the listing.
Show source
def list(*args, &block)
cmd = "LIST"
args.each do |arg|
cmd = "#{cmd} #{arg}"
end
lines = []
retrlines(cmd) do |line|
lines << line
end
if block
lines.each(&block)
end
return lines
end