def getFileInAlterationsOrGivenDirectory(directory, fileName):
 settingsAlterationsDirectory = archive.getSettingsPath('alterations')
 archive.makeDirectory(settingsAlterationsDirectory)
 fileInSettingsAlterationsDirectory = getFileInGivenDirectory(settingsAlterationsDirectory, fileName)
 if (fileInSettingsAlterationsDirectory != ''):
  return fileInSettingsAlterationsDirectory
 alterationsDirectory = archive.getSkeinforgePath('alterations')
 fileInAlterationsDirectory = getFileInGivenDirectory(alterationsDirectory, fileName)
 if (fileInAlterationsDirectory != ''):
  return fileInAlterationsDirectory
 if (directory == ''):
  directory = os.getcwd()
 return getFileInGivenDirectory(directory, fileName)

def getFileInAlterationsOrGivenDirectory ( directory , fileName ) : settingsAlterationsDirectory = archive . getSettingsPath ( 'alterations' ) archive . makeDirectory ( settingsAlterationsDirectory ) fileInSettingsAlterationsDirectory = getFileInGivenDirectory ( settingsAlterationsDirectory , fileName ) if ( fileInSettingsAlterationsDirectory != '' ) : return fileInSettingsAlterationsDirectory alterationsDirectory = archive . getSkeinforgePath ( 'alterations' ) fileInAlterationsDirectory = getFileInGivenDirectory ( alterationsDirectory , fileName ) if ( fileInAlterationsDirectory != '' ) : return fileInAlterationsDirectory if ( directory == '' ) : directory = os . getcwd ( ) return getFileInGivenDirectory ( directory , fileName )
get the file from the filename or the lowercase filename in the alterations directories .