protected function addFilesystemResource($path, FilesystemResource $resource)
    {
        $resource = clone $resource;
        $resource->attachTo($this, $path);

        $relativePath = Path::makeRelative($resource->getFilesystemPath(), $this->baseDirectory);

        $this->insertReference($path, $relativePath);

        $this->storeVersion($resource);
    }
protected function addFilesystemResource($path, FilesystemResource $resource)
    {
        $resource = clone $resource;
        $resource->attachTo($this, $path);

        $relativePath = Path::makeRelative($resource->getFilesystemPath(), $this->baseDirectory);

        $this->insertReference($path, $relativePath);

        $this->storeVersion($resource);
    }
protected function addFilesystemResource ( $ path , FilesystemResource $ resource ) { $ resource = clone $ resource ; $ resource -> attachTo ( $ this , $ path ) ; $ relativePath = Path :: makeRelative ( $ resource -> getFilesystemPath ( ) , $ this -> baseDirectory ) ; $ this -> insertReference ( $ path , $ relativePath ) ; $ this -> storeVersion ( $ resource ) ; }
Adds a filesystem resource to the JSON file.

@param string             $path     The Puli path.
@param FilesystemResource $resource The resource to add.
Adds a filesystem resource to the JSON file .