private function ensureDirectoryExists($path)
{
if (array_key_exists($path, $this->json)) {
return;
}
// Recursively initialize parent directories
if ('/' !== $path) {
$this->ensureDirectoryExists(Path::getDirectory($path));
}
$this->json[$path] = null;
}