Refactor file utils (#10970)

### What problem does this PR solve?

As title.

### Type of change

- [x] Refactoring

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2025-11-03 18:54:55 +08:00
committed by GitHub
parent 076d811086
commit 1284647694
3 changed files with 7 additions and 78 deletions

View File

@ -31,3 +31,9 @@ def get_project_base_directory(*args):
if args:
return os.path.join(PROJECT_BASE, *args)
return PROJECT_BASE
def traversal_files(base):
for root, ds, fs in os.walk(base):
for f in fs:
fullname = os.path.join(root, f)
yield fullname