def getFileInGivenDirectory(directory, fileName):
 directoryListing = os.listdir(directory)
 lowerFileName = fileName.lower()
 for directoryFile in directoryListing:
  if (directoryFile.lower() == lowerFileName):
   return getFileTextGivenDirectoryFileName(directory, directoryFile)
 return ''

def getFileInGivenDirectory ( directory , fileName ) : directoryListing = os . listdir ( directory ) lowerFileName = fileName . lower ( ) for directoryFile in directoryListing : if ( directoryFile . lower ( ) == lowerFileName ) : return getFileTextGivenDirectoryFileName ( directory , directoryFile ) return ''
get the file from the filename or the lowercase filename in the given directory .