Class: Etna::Filesystem::GeneAsperaCliFilesystem
Overview
Genentech’s aspera deployment doesn’t support modern commands, unfortunately…
Instance Method Summary
collapse
#exist?, #initialize, #run_ascli_cmd, #with_readable
#mkio
#exist?, #with_readable
Instance Method Details
#mkcommand(rd, wd, file, opts, size_hint: nil) ⇒ Object
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
# File 'lib/etna/filesystem.rb', line 216
def mkcommand(rd, wd, file, opts, size_hint: nil)
if opts.include?('w')
super.map do |e|
if e.instance_of?(String) && e.start_with?("stdio://")
"stdio-tar://"
elsif e == file
::File.dirname(file)
else
e
end
end.insert(2, "-d")
else
super
end
end
|
#mkdir_p(dest) ⇒ Object
207
208
209
|
# File 'lib/etna/filesystem.rb', line 207
def mkdir_p(dest)
end
|
#mv ⇒ Object
211
212
213
|
# File 'lib/etna/filesystem.rb', line 211
def mv
raise "mv is not supported"
end
|
#rm_rf ⇒ Object
203
204
205
|
# File 'lib/etna/filesystem.rb', line 203
def rm_rf
raise "rm_rf is not supported"
end
|
#tmpdir ⇒ Object
199
200
201
|
# File 'lib/etna/filesystem.rb', line 199
def tmpdir
raise "tmpdir is not supported"
end
|
#with_writeable(dest, opts = 'w', size_hint: nil, &block) ⇒ Object
232
233
234
235
236
237
238
239
240
241
|
# File 'lib/etna/filesystem.rb', line 232
def with_writeable(dest, opts = 'w', size_hint: nil, &block)
raise "#{self.class.name} requires size_hint in with_writeable" if size_hint.nil?
super do |io|
io.write("File: #{::File.basename(dest)}\n")
io.write("Size: #{size_hint}\n")
io.write("\n")
yield io
end
end
|