def METHOD_NAME(dirName, create=False):
    directory = os.path.realpath(dirName)
    if not os.path.exists(directory):
        if create:
            os.makedirs(directory)
        else:
            message = 'Directory ' + directory + ' does not exist'
            raise WLSTException(message)
    elif not os.path.isdir(directory):
        message = 'Directory ' + directory + ' is not a directory'
        raise WLSTException(message)
    return fixupPath(directory)