public function putContents( $contents, $ex_lock = false ) : int
    {
        $flags = $ex_lock ? LOCK_EX : 0;
        $res = file_put_contents( $this->path, $contents, $flags );
        if ($res === FALSE){
            throw new FileOutputException($this);
        }
        return $res;
    }
public function putContents( $contents, $ex_lock = false ) : int
    {
        $flags = $ex_lock ? LOCK_EX : 0;
        $res = file_put_contents( $this->path, $contents, $flags );
        if ($res === FALSE){
            throw new FileOutputException($this);
        }
        return $res;
    }
public function putContents ( $ contents , $ ex_lock = false ) : int { $ flags = $ ex_lock ? LOCK_EX : 0 ; $ res = file_put_contents ( $ this -> path , $ contents , $ flags ) ; if ( $ res === FALSE ) { throw new FileOutputException ( $ this ) ; } return $ res ; }
Save string data as a file

@param string $contents
@param bool $ex_lock

@return int

@throws FileOutputException
Save string data as a file