169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
# File 'lib/inspec/file_provider.rb', line 169
def (destination_path = '.')
FileUtils.mkdir_p(destination_path)
walk_tar(@path) do |files|
files.each do |file|
next unless @files.include?(file.full_name)
final_path = File.join(destination_path, file.full_name)
FileUtils.remove_entry(final_path) if File.exist?(final_path)
FileUtils.mkdir_p(File.dirname(final_path))
File.open(final_path, 'wb') { |f| f.write(file.read) }
end
end
end
|