KamranAhmed\Smasher\Path::getDetail PHP Method

getDetail() public method

Gets the detail about the currently set path
public getDetail ( ) : array
return array
    public function getDetail()
    {
        $pathDetail = [];
        $pathDetail['@name'] = $this->getName();
        $pathDetail['@path'] = $this->path;
        $pathDetail['@type'] = $this->getType();
        $pathDetail['@size'] = $this->getSize();
        $pathDetail['@mode'] = $this->getMode();
        $pathDetail['@owner'] = $this->getOwner();
        $pathDetail['@last_modified'] = $this->getLastModified();
        $pathDetail['@group'] = $this->getGroup();
        if ($pathDetail['@type'] === 'link') {
            // Save the destination of this symlink
            $pathDetail['@destination'] = $this->getRealPath();
        } elseif ($pathDetail['@type'] === 'file') {
            // If it was a file, put the contents
            $pathDetail['@content'] = $this->getFileContent();
        }
        return $pathDetail;
    }