Skip to content

Commit

Permalink
feat: implement support for removing GFAL remote files (#1103)
Browse files Browse the repository at this point in the history
* add gfal RemoteObject.remove() method

* fmt

Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
  • Loading branch information
3 people committed Jan 26, 2022
1 parent 8868b00 commit 25943e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions snakemake/remote/gfal.py
Expand Up @@ -151,6 +151,9 @@ def upload(self):
# disable all timeouts (file transfers can take a long time)
self._gfal("copy", "-p", "-f", "-n", "4", "-t", "0", "-T", "0", source, target)

def remove(self):
self._gfal("rm", "-r", self.remote_file())

@property
def list(self):
# TODO implement listing of remote files with patterns
Expand Down

0 comments on commit 25943e5

Please sign in to comment.