public function withContent($content): vfsStreamFile
    {
        if (is_string($content)) {
            $this->content = new StringBasedFileContent($content);
        } elseif ($content instanceof FileContent) {
            $this->content = $content;
        } else {
            throw new \InvalidArgumentException('Given content must either be a string or an instance of org\bovigo\vfs\content\FileContent');
        }

        return $this;
    }
public function withContent($content): vfsStreamFile
    {
        if (is_string($content)) {
            $this->content = new StringBasedFileContent($content);
        } elseif ($content instanceof FileContent) {
            $this->content = $content;
        } else {
            throw new \InvalidArgumentException('Given content must either be a string or an instance of org\bovigo\vfs\content\FileContent');
        }

        return $this;
    }
public function withContent ( $ content ) : vfsStreamFile { if ( is_string ( $ content ) ) { $ this -> content = new StringBasedFileContent ( $ content ) ; } elseif ( $ content instanceof FileContent ) { $ this -> content = $ content ; } else { throw new \ InvalidArgumentException ( 'Given content must either be a string or an instance of org\bovigo\vfs\content\FileContent' ) ; } return $ this ; }
sets the contents of the file

Setting content with this method does not change the time when the file
was last modified.

@param   string|FileContent  $content
@return  vfsStreamFile
@throws  \InvalidArgumentException
sets the contents of the file