15 lines
412 B
Python
15 lines
412 B
Python
from pathlib import Path
|
|
|
|
from . import data
|
|
|
|
|
|
def write_tree(directory="."):
|
|
with Path.iterdir(directory) as it:
|
|
for entry in it:
|
|
full = f"{directory}/{entry.name}"
|
|
if entry.is_file(follow_symlinks=False):
|
|
# TODO write the file to object store
|
|
print(full)
|
|
elif entry.is_dir(follow_symlinks=False):
|
|
write_tree(full)
|