RetailGenie / utils /file_utils.py
Parishri07's picture
Upload 7 files
efdcdc4 verified
raw
history blame contribute delete
481 Bytes
import os
def get_subfolders(path):
try:
return sorted([f for f in os.listdir(path) if os.path.isdir(os.path.join(path, f))])
except Exception as e:
print(f"❌ Error reading subfolders from {path}: {e}")
return []
def get_csv_files(path):
try:
return sorted([f[:-4] for f in os.listdir(path) if f.endswith(".csv")])
except Exception as e:
print(f"❌ Error reading CSVs from {path}: {e}")
return []