Sha256: b4ae161b19ccb98f492a88fc4003e4b62b68d33b3fa6e533cdedb12405a5a29e
Contents?: true
Size: 702 Bytes
Versions: 8
Compression:
Stored size: 702 Bytes
Contents
require 'rmega/crypto/crypto' require 'rmega/utils' require 'rmega/nodes/node' require 'rmega/nodes/expandable' require 'rmega/nodes/traversable' require 'rmega/nodes/deletable' module Rmega module Nodes class Folder < Node include Expandable include Traversable include Deletable def download(path) children.each do |node| if node.type == :file node.download path elsif node.type == :folder subfolder = ::File.expand_path ::File.join(path, node.name) Dir.mkdir(subfolder) unless Dir.exists?(subfolder) node.download subfolder end end nil end end end end
Version data entries
8 entries across 8 versions & 1 rubygems