INNER CODE UNIT · Python

remove

casualsnek/waydroid_script · stuff/general.py:49

    def remove(self):
        for f in self.files:
            file = os.path.join(self.copy_dir, self.partition, f)
            if "*" in file:
                for wildcard_file in glob.glob(file):
                    if os.path.isdir(wildcard_file):
                        shutil.rmtree(wildcard_file)
                    elif os.path.isfile(wildcard_file):
                        os.remove(wildcard_file)
            else:
                if os.path.isdir(file):
                    shutil.rmtree(file)
                elif os.path.isfile(file):
                    os.remove(file)

    def extract(self):
        Logger.info(f"Extracting {self.download_loc} to {self.extract_to}")
        with zipfile.ZipFile(self.download_loc) as z:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…