Class: Etna::Filesystem::GeneAsperaCliFilesystem
- Inherits:
-
AsperaCliFilesystem
- Object
- Etna::Filesystem
- AsperaCliFilesystem
- Etna::Filesystem::GeneAsperaCliFilesystem
- Defined in:
- lib/etna/filesystem.rb
Overview
Genentech’s aspera deployment doesn’t support modern commands, unfortunately…
Instance Method Summary collapse
- #mkcommand(rd, wd, file, opts, size_hint: nil) ⇒ Object
- #mkdir_p(dest) ⇒ Object
- #with_writeable(dest, opts = 'w', size_hint: nil, &block) ⇒ Object
Methods inherited from AsperaCliFilesystem
#exist?, #initialize, #mv, #rm_rf, #run_ascli_cmd, #tmpdir, #with_readable
Methods included from WithPipeConsumer
Methods inherited from Etna::Filesystem
#exist?, #ls, #mv, #rm_rf, #tmpdir, #with_readable
Constructor Details
This class inherits a constructor from Etna::Filesystem::AsperaCliFilesystem
Instance Method Details
#mkcommand(rd, wd, file, opts, size_hint: nil) ⇒ Object
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/etna/filesystem.rb', line 219 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
215 216 217 |
# File 'lib/etna/filesystem.rb', line 215 def mkdir_p(dest) # Pass through -- this file system creates containing directories by default, womp womp. end |
#with_writeable(dest, opts = 'w', size_hint: nil, &block) ⇒ Object
235 236 237 238 239 240 241 242 243 244 |
# File 'lib/etna/filesystem.rb', line 235 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 |