Sha256: dfc51b2b7fde2ae30e159d5247c07850e2fa0f00a1e35b12b64ec4e595ba8069

Contents?: true

Size: 351 Bytes

Versions: 4

Compression:

Stored size: 351 Bytes

Contents

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

sc = Lignite::SystemCommands.new

result = ""
name = "/home/root/lms2012/prjs/"
bufsize = 42 # 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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lignite-0.2.0 examples/sys_list_files.rb
lignite-0.1.2 examples/sys_list_files.rb
lignite-0.1.1 examples/sys_list_files.rb
lignite-0.1.0 examples/sys_list_files.rb