diff --git a/csst_common/utils/_io.py b/csst_common/utils/_io.py new file mode 100644 index 0000000000000000000000000000000000000000..70ec85bc556345029a89743e46cb591c8625fe2d --- /dev/null +++ b/csst_common/utils/_io.py @@ -0,0 +1,18 @@ +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) + + + +