summaryrefslogtreecommitdiff
path: root/hercules/code/fileutils.py
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-20 16:38:51 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-20 16:38:51 +0300
commit06887bd17dd04cb6314cc215424b041dda7dca87 (patch)
tree1f6ad19c17aac7d1d099836e237092bfa6857272 /hercules/code/fileutils.py
parent4964b079cb3864f5e5a7c530b0eb0c5957363baa (diff)
downloadtools-06887bd17dd04cb6314cc215424b041dda7dca87.tar.gz
tools-06887bd17dd04cb6314cc215424b041dda7dca87.tar.bz2
tools-06887bd17dd04cb6314cc215424b041dda7dca87.tar.xz
tools-06887bd17dd04cb6314cc215424b041dda7dca87.zip
hercules: add support for convert all non free sprites.
Diffstat (limited to 'hercules/code/fileutils.py')
-rw-r--r--hercules/code/fileutils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/hercules/code/fileutils.py b/hercules/code/fileutils.py
index 44ec591..2cf106b 100644
--- a/hercules/code/fileutils.py
+++ b/hercules/code/fileutils.py
@@ -73,3 +73,10 @@ def makeDir(path):
def removeAllFiles(path):
if os.path.exists(path):
shutil.rmtree(path)
+
+def findFileIn(names, dirs):
+ for name in names:
+ for path in dirs:
+ if os.path.exists(path + name):
+ return path
+ return None