projects
/
arvados.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add 'tools/arvbox/' from commit 'd3d368758db1f4a9fa5b89f77b5ee61d68ef5b72'
[arvados.git]
/
apps
/
workbench
/
test
/
helpers
/
download_helper.rb
1
module DownloadHelper
2
module_function
3
4
def path
5
Rails.root.join 'tmp', 'downloads'
6
end
7
8
def clear
9
if File.exist? path
10
FileUtils.rm_r path
11
end
12
begin
13
Dir.mkdir path
14
rescue Errno::EEXIST
15
end
16
end
17
18
def done
19
Dir[path.join '*'].reject do |f|
20
/\.part$/ =~ f
21
end
22
end
23
end