Sha256: 3d08f26dac0174552521983607caf7f98c4c515b5942cfff104775a2cc118b47

Contents?: true

Size: 374 Bytes

Versions: 4

Compression:

Stored size: 374 Bytes

Contents

#!/usr/bin/ruby
require "lignite"

sc = Lignite::SystemCommands.new

result = ""
name = "/home/root/lms2012/prjs/BrkProg_SAVE/"
bufsize = 20 # to demonstrate chunking
fsize, handle, data = sc.list_files(bufsize, name)
loop do
  result += data
  fsize -= data.bytesize
  break if fsize.zero?
  handle, data = sc.continue_list_files(handle, bufsize)
end
puts result

sc.close

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lignite-0.6.0 examples/sys_list_files.rb
lignite-0.5.0 examples/sys_list_files.rb
lignite-0.4.0 examples/sys_list_files.rb
lignite-0.3.0 examples/sys_list_files.rb