Sha256: 1d7269195fce54c7f145e6af63e943f5220bd8fc071d2d4722adedf1e90938c7

Contents?: true

Size: 646 Bytes

Versions: 1

Compression:

Stored size: 646 Bytes

Contents

# -*- coding: utf-8 -*-
begin
  require 'sqlite3'
  require 'tree_rb/output_sqlite/sqlite_dir_tree_visitor'
rescue LoadError
  $stderr.puts 'You must gem install sqlite3 to use this output format'
end

module TreeRb

  class SqliteHelper

    def run(directory_tree_walker, output, options)
      unless options[:output]
        $stderr.puts "need to specify the -o options"
      else
        output.close
        filename = options[:output]
        visitor  = SqliteDirTreeVisitor.new(filename)
        #start = Time.now
        #me    = self
        #bytes = 0
        directory_tree_walker.run(visitor)
      end

    end

  end
end # module

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tree.rb-0.3.11 lib/tree_rb/output_sqlite/sqlite_helper.rb