Lines Matching refs:this

79         $this->filename = $filename;
80 $this->mime = $mime;
82 $this->symbolic = $this->getStandardURL($filename);
84 $this->symbolic = $this->getStandardURL($symbolic);
94 $this->alreadyRead = false;
95 if ($this->handle !== null) {
96 fclose($this->handle);
97 $this->handle = null;
109 if ($this->alreadyRead) {
112 $this->alreadyRead = true;
119 function getFilename() { return $this->symbolic; }
125 function getDataFilename() { return $this->filename; }
131 if ($this->stat === null) {
132 $this->stat = @stat($this->filename);
135 if ($this->stat === false) {
136 $this->stat = array();
139 return $this->stat;
147 if ($this->mime === null) {
149 $this->mime = MIME_Type::autoDetect($this->getDataFilename());
152 if (PEAR::isError($this->mime)) {
153 $this->mime = parent::getMime();
156 return $this->mime;
164 if ($this->handle === null) {
165 $this->handle = @fopen($this->filename, "r");
167 if (!is_resource($this->handle)) {
168 $this->handle = null;
169 return PEAR::raiseError("Can't open {$this->filename} for reading");
171 if ($this->handle === false) {
172 $this->handle = null;
173 return PEAR::raiseError("File {$this->filename} not found");
183 $error = $this->_ensureFileOpened();
188 if (feof($this->handle)) {
194 while (!feof($this->handle)) {
195 $contents .= fread($this->handle, $blockSize);
202 return fread($this->handle, $length);
212 $error = $this->_ensureFileOpened();
217 $before = ftell($this->handle);
218 if (($length == -1 && @fseek($this->handle, 0, SEEK_END) === -1) ||
219 ($length >= 0 && @fseek($this->handle, $length, SEEK_CUR) === -1)) {
222 return ftell($this->handle) - $before;
231 if ($this->handle === null) {
235 $before = ftell($this->handle);
236 if (($length == -1 && @fseek($this->handle, 0, SEEK_SET) === -1) ||
237 ($length >= 0 && @fseek($this->handle, -$length, SEEK_CUR) === -1)) {
240 return $before - ftell($this->handle);
249 if ($this->handle === null) {
252 return ftell($this->handle);
275 $file = $this->getDataFilename();
276 $pos = $this->tell();
277 $this->close();