private function ensureDirectoryExists($path)
    {
        if (!isset($this->resources[$path])) {
            // Recursively initialize parent directories
            if ($path !== '/') {
                $this->ensureDirectoryExists(Path::getDirectory($path));
            }

            $this->resources[$path] = new GenericResource($path);
            $this->resources[$path]->attachTo($this);

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

            $this->resources[$path] = new GenericResource($path);
            $this->resources[$path]->attachTo($this);

            return;
        }
    }
private function ensureDirectoryExists ( $ path ) { if ( ! isset ( $ this -> resources [ $ path ] ) ) { // Recursively initialize parent directories if ( $ path !== '/' ) { $ this -> ensureDirectoryExists ( Path :: getDirectory ( $ path ) ) ; } $ this -> resources [ $ path ] = new GenericResource ( $ path ) ; $ this -> resources [ $ path ] -> attachTo ( $ this ) ; return ; } }
Recursively creates a directory for a path.

@param string $path A directory path.
Recursively creates a directory for a path .