Files
mtgodot-poc/assets/pc2/ymir work/pc2/findfilesbyext.py
T
shenandClaude Sonnet 5 2277b1dd60 Vendor Metin2 assets (assets/ + bgm/)
Committed to this self-hosted private repo so a clone builds on any machine
without a separate asset sync. Copyrighted Ymir art — do not publish or
redistribute. 54198 files, ~2.2 GB. asset_index.txt / assets.zip stay
gitignored (derived: bake_asset_index.gd / pack-assets.sh).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013EJxkHiNKS4kybHS3XKyAJ
2026-08-31 20:04:32 +09:00

23 lines
432 B
Python

import os
import stat
def FindFilesByExt(ext, path):
if path[-1] != os.sep:
path += os.sep
ext = ext.lower()
retList = []
for name in os.listdir(path):
if stat.S_ISDIR(os.stat(path+name).st_mode):
retList += FindFilesByExt(ext, path+name)
else:
if name[-len(ext):].lower() == ext:
retList.append(path + name)
return retList
if __name__ == "__main__":
for path in FindFilesByExt(".msa", "."):
print path