protected function processPath($path, $force)
    {
        $existsPath = $this->fs->exists($path);
        $isEmpty = $this->isEmptyDir($path);

        if ($existsPath === true && $force === false && $isEmpty === false) {
            throw new \RuntimeException(sprintf('Path "%s" exists and is not empty.', $path));
        }

        $existsPath ? $this->clearDir($path) : $this->fs->mkdir($path);
    }