first commit
This commit is contained in:
14
controllers/localfile_handles.py
Normal file
14
controllers/localfile_handles.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import os
|
||||
from models.logger import setup_logger
|
||||
|
||||
logger = setup_logger()
|
||||
|
||||
get_emoji_count = lambda folder_path: sum(
|
||||
1 for file in os.listdir(folder_path)
|
||||
if os.path.isfile(os.path.join(folder_path, file)) and file.lower().endswith(('.jpg', '.jpeg'))
|
||||
)
|
||||
|
||||
def yield_emoji_path(folder_path: str):
|
||||
for root, dirs, files in os.walk(folder_path):
|
||||
for file in files:
|
||||
yield os.path.join(root, file)
|
||||
Reference in New Issue
Block a user