Commit 35519108 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added functions to remove files/directory

parent 8447342a
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
import glob
import os
import shutil


def remove_files(fmt=""):
    """ Remove files matching the specified format. """
    for fp in glob.glob(fmt):
        os.remove(fp)


def remove_dir(path=""):
    """ Remove the specified directory. """
    shutil.rmtree(path)