def get_file_list_recursive(directory_path):
"""
指定されたディレクトリ以下のすべてのファイルのパスを再帰的に取得する
Parameters:
- directory_path (str): ファイルリストを取得するディレクトリのパス
Returns:
- list: ディレクトリ以下のすべてのファイルのパスを含むリスト
"""
file_list = []
for root, dirs, files in os.walk(directory_path):
for file in files:
file_list.append(os.path.join(root, file))
return file_list
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme