diff options
Diffstat (limited to 'hercules/code/fileutils.py')
-rw-r--r-- | hercules/code/fileutils.py | 7 |
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 |