public function write($string)
    {
        $fileName = $this->getFileName();
        $handle = $this->getHandle();

        if (fwrite($handle, $string) === false) {
            throw new \Exception('Cannot write to file ' . $fileName);
        }
    }
public function write($string)
    {
        $fileName = $this->getFileName();
        $handle = $this->getHandle();

        if (fwrite($handle, $string) === false) {
            throw new \Exception('Cannot write to file ' . $fileName);
        }
    }
public function write ( $ string ) { $ fileName = $ this -> getFileName ( ) ; $ handle = $ this -> getHandle ( ) ; if ( fwrite ( $ handle , $ string ) === false ) { throw new \ Exception ( 'Cannot write to file ' . $ fileName ) ; } }
Binary-safe file handle write.
@param string $string contents
@throws \Exception
Binary - safe file handle write .