22 lines
525 B
Python
22 lines
525 B
Python
from .structures import PathInfo, FileInfo
|
|
from pathlib import Path
|
|
import os
|
|
|
|
|
|
def classify_files(path: str) -> PathInfo:
|
|
path_info = PathInfo(Path(path))
|
|
|
|
# Go over all files
|
|
for root, dirs, files in os.walk(path_info.path):
|
|
for filename in files:
|
|
filepath = os.path.join(root, filename)
|
|
print(filepath)
|
|
|
|
return path_info
|
|
|
|
|
|
if __name__ == "__main__":
|
|
results = classify_files("/home/max/Media Library/testing/The Mentalist (2008)")
|
|
|
|
print(results)
|
|
print("Done.")
|