/dev/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/trunk

« back to all changes in this revision

Viewing changes to classes/stream/streamwriter.php

  • Committer: Suren A. Chilingaryan
  • Date: 2008-04-02 10:23:22 UTC
  • Revision ID: csa@dside.dyndns.org-20080402102322-okib92sicg2dx3o3
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
abstract class VIRTUALStreamWriter implements STREAMWriterInterface {
 
3
 function Write($data, $flags = 0) {
 
4
    return $this->WriteData($data, $flags);
 
5
 }
 
6
 
 
7
 function WriteFile($file, $flags = 0) {
 
8
    $handle = fopen($file, "rb");
 
9
    if ($handle) {
 
10
        while (!feof($handle)) {
 
11
            $this->WriteData(fread($handle, STREAM::BUFFER_SIZE));
 
12
        }
 
13
        fclose($handle);
 
14
    } else 
 
15
        throw new ADEIException(translate("File (%s) is not accessible", $file));
 
16
 }
 
17
}
 
18
?>
 
 
b'\\ No newline at end of file'