From 25943e5630ff6d83afa5cba28edf473ce2ca87da Mon Sep 17 00:00:00 2001 From: Cail Daley Date: Wed, 26 Jan 2022 04:21:00 -0600 Subject: [PATCH] feat: implement support for removing GFAL remote files (#1103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add gfal RemoteObject.remove() method * fmt Co-authored-by: Johannes Köster Co-authored-by: Johannes Köster --- snakemake/remote/gfal.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snakemake/remote/gfal.py b/snakemake/remote/gfal.py index fbe79ac01..cbc279fd3 100644 --- a/snakemake/remote/gfal.py +++ b/snakemake/remote/gfal.py @@ -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