ray-the-ripper/src/file_classifier.py

23 lines
525 B
Python
Raw Normal View History

2025-09-11 01:36:24 +02:00
from .structures import PathInfo, FileInfo
2025-09-08 08:03:25 +02:00
from pathlib import Path
2025-09-11 01:36:24 +02:00
import os
2025-09-07 18:29:38 +02:00
2025-09-11 01:36:24 +02:00
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
2025-09-07 18:29:38 +02:00
if __name__ == "__main__":
2025-09-08 08:03:25 +02:00
results = classify_files("/home/max/Media Library/testing/The Mentalist (2008)")
2025-09-07 18:29:38 +02:00
print(results)
2025-09-08 08:03:25 +02:00
print("Done.")