API16:JStream/tell
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Syntax
tell()
Defined in
libraries/joomla/filesystem/stream.php
Importing
jimport( 'joomla.filesystem.stream' );
Source Body
function tell() { if(!$this->_fh) { $this->setError(JText::_('File not open')); return false; } $res = false; // Capture PHP errors $php_errormsg = ''; $track_errors = ini_get('track_errors'); ini_set('track_errors', true); switch($this->processingmethod) { case 'gz': $res = gztell($this->_fh); break; case 'bz': case 'f': default: $res = ftell($this->_fh); break; } // may return 0 so check its really false if($res === FALSE) { $this->setError($php_errormsg); } // restore error tracking to what it was before ini_set('track_errors',$track_errors); // return the result return $res; }
[Edit See Also] SeeAlso:JStream/tell
Examples
<CodeExamplesForm />
