def METHOD_NAME(self):
    size = 0
    # pylint: disable=unused-variable
    for dirpath, dirnames, filenames in os.walk(self._path):
        for filename in filenames:
            path = os.path.join(dirpath, filename)
            # skip if it is symbolic link
            if not os.path.islink(path):
                try:
                    size += os.path.getsize(path)
                except OSError:
                    logger.error(
                        "Path %s does not exist or is inaccessible.",
                        path,
                    )
                    continue
                if size >= self._max_size:
                    # pylint: disable=logging-format-interpolation
                    logger.warning(
                        "Persistent storage max capacity has been "
                        "reached. Currently at {}KB. Telemetry will be "
                        "lost. Please consider increasing the value of "
                        "'storage_max_size' in exporter config.".format(
                            str(size / 1024)
                        )
                    )
                    return False
    return True