/[cvs]/bareface/yakka/library/YakkaFileReader.php
ViewVC logotype

Contents of /bareface/yakka/library/YakkaFileReader.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sun Jan 5 00:22:25 2003 UTC (21 years, 11 months ago) by bareface
Branch: MAIN
CVS Tags: HEAD
init;

1 <?php
2
3 require_once("YakkaObject.php");
4
5 class YakkaFileReader extends YakkaObject {
6 var $fileHandle;
7 var $fileData;
8
9 function YakkaFileReader($filename = null) {
10 $this->YakkaObject("YakkaFileReader");
11
12 $this->fileHandle = $filename ? $this->open($filename) : null;
13 $this->fileData = null;
14 }
15
16 function open($filename) {
17 return $this->fileHandle = file_exists($filename) ? fopen($filename, "r") : null;
18 }
19
20 function close() {
21 return $this->fileHandle ? fclose($this->fileHandle) : null;
22 }
23
24 function readAll() {
25 while ($buffer = fread($this->fileHandle, 4096))
26 $this->fileData .= $buffer;
27
28 return $this->fileData;
29 }
30
31 function isOpen() {
32 return $this->fileHandle ? true : false;
33 }
34 }
35
36 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed