def getFileOrDirectoryTypes(fileName, fileTypes, wasCancelled):
 if isEmptyOrCancelled(fileName, wasCancelled):
  return []
 if isDirectorySetting():
  return archive.getFilesWithFileTypesWithoutWords(fileTypes, [], fileName)
 return [fileName]

def getFileOrDirectoryTypes ( fileName , fileTypes , wasCancelled ) : if isEmptyOrCancelled ( fileName , wasCancelled ) : return [ ] if isDirectorySetting ( ) : return archive . getFilesWithFileTypesWithoutWords ( fileTypes , [ ] , fileName ) return [ fileName ]
get the gcode files in the directory the file is in if directory setting is true .