Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のように、gitリポジトリからディレクトリとファイルの辞書を取得しようとしています:
{"dir1": ["file1", "file2", "dir2", "dir3"], "dir2": {"file3", "dir4"}}
ファイルのリストを取得する方法は知っていますが、問題はこのように辞書に変換する方法です。
ファイルのリストは次のようになります。
["dir/dir1/file1", "dir/dir1/file2", "dir/dir1/dir2/somefile"]