摘要:
from pathlib import Path # 创建一个Path对象表示目录 base_directory = Path('C:/path/to/your/directory') # 使用/运算符来拼接子目录和文件名 file_path = base_directory / 'subdirec 阅读全文
posted @ 2024-06-27 17:23
你说夕阳很美
阅读(175)
评论(0)
推荐(0)
摘要:
from pathlib import Path def find_latest_modified_file(directory): latest_file = None latest_file_time = 0 # 遍历目录中的所有文件 for file in directory.iterdir( 阅读全文
posted @ 2024-06-27 17:21
你说夕阳很美
阅读(182)
评论(0)
推荐(0)

浙公网安备 33010602011771号