diff --git a/pyutil.py b/pyutil.py index d0b4771..f9ae532 100644 --- a/pyutil.py +++ b/pyutil.py @@ -77,6 +77,16 @@ def printStackTrace(fromFile): log(error, 4) return 1 +# @def Função que verifica se um arquivo existe +# @param string filePath: Caminho do arquivo a ser checado +# @return bool Verdadeiro se o arquivo existir, Falso caso contrário +def file_exists(filePath): + from os.path import isfile, exists + if ((isfile(filePath) == 1) and (exists(filePath) == 1)): + return True + else: + return False + def file_rename(filename, fromfile): from shutil import move newFilename = "" -- libgit2 0.21.2