src/ShapeFile.php
private function _openFile($toWrite, $extension, $name)
    {
        $shp_name = $this->_getFilename($extension);
        $result = @fopen($shp_name, ($toWrite ? 'wb+' : 'rb'));
        if (! $result) {
            $this->setError(sprintf('It wasn\'t possible to open the %s file "%s"', $name, $shp_name));

            return false;
        }

        return $result;
    }
private function _openFile($toWrite, $extension, $name)
    {
        $shp_name = $this->_getFilename($extension);
        $result = @fopen($shp_name, ($toWrite ? 'wb+' : 'rb'));
        if (! $result) {
            $this->setError(sprintf('It wasn\'t possible to open the %s file "%s"', $name, $shp_name));

            return false;
        }

        return $result;
    }
private function _openFile ( $ toWrite , $ extension , $ name ) { $ shp_name = $ this -> _getFilename ( $ extension ) ; $ result = @ fopen ( $ shp_name , ( $ toWrite ? 'wb+' : 'rb' ) ) ; if ( ! $ result ) { $ this -> setError ( sprintf ( 'It wasn\'t possible to open the %s file "%s"' , $ name , $ shp_name ) ) ; return false ; } return $ result ; }
Generic interface to open files.

@param bool   $toWrite   Whether file should be opened for writing
@param string $extension File extension
@param string $name      Verbose file name to report errors

@return file|false File handle
Generic interface to open files .