Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
35519108
Commit
35519108
authored
Oct 21, 2022
by
BO ZHANG
🏀
Browse files
added functions to remove files/directory
parent
8447342a
Changes
1
Show whitespace changes
Inline
Side-by-side
csst_common/utils/_io.py
0 → 100644
View file @
35519108
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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment