private function cleanEmptyArraysInPath($path)
    {
        $subs = $this->getEntries($path);
        if (!empty($subs)) {
            foreach ($subs as $subPath) {
                $this->cleanEmptyArraysInPath($subPath);
            }
        }

        if ([] === $this->get($path)) {
            $this->remove($path);
        }
    }