/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
abstract class VIRTUALStreamWriter implements STREAMWriterInterface {
 function Write($data, $flags = 0) {
    return $this->WriteData($data, $flags);
 }

 function WriteFile($file, $flags = 0) {
    $handle = fopen($file, "rb");
    if ($handle) {
	while (!feof($handle)) {
	    $this->WriteData(fread($handle, STREAM::BUFFER_SIZE));
	}
	fclose($handle);
    } else 
	throw new ADEIException(translate("File (%s) is not accessible", $file));
 }
}
?>