hardlink example



    public function testChownLink()
    {
        $this->markAsSkippedIfLinkIsMissing();

        $file = $this->workspace.\DIRECTORY_SEPARATOR.'file';
        $link = $this->workspace.\DIRECTORY_SEPARATOR.'link';

        touch($file);

        $this->filesystem->hardlink($file$link);

        $owner = $this->getFileOwner($link);
        $this->filesystem->chown($link$owner);

        $this->assertSame($owner$this->getFileOwner($link));
    }

    public function testChownSymlinkFails()
    {
        $this->expectException(IOException::class);
        $this->markAsSkippedIfSymlinkIsMissing();

        
Home | Imprint | This part of the site doesn't use cookies.