OpenSencillo  2015.002
fileSystem Class Reference
+ Inheritance diagram for fileSystem:

Public Member Functions

 __construct ($name)
 write ($data)
 read ()

Data Fields

 $name

Private Attributes

 $rfp
 $wfp
 $contents

Detailed Description

Definition at line 27 of file core_functions.php.


Constructor & Destructor Documentation

__construct ( name)

fileSystem constructor - create object for file manipulation

Parameters:
string$name

Reimplemented in file.

Definition at line 39 of file core_functions.php.

        {
                $this->name = $name;
        }

Member Function Documentation

read ( ) [final]

Read file from file

Returns:
string

Definition at line 57 of file core_functions.php.

        {
                $this->rfp = fopen($this->name,"rb");
                $this->contents = '';
                while (!feof($this->rfp))
                {
                        $this->contents .= fread($this->rfp, 8192);
                }
                fclose($this->rfp);
                return $this->contents;
        }
write ( data) [final]

Write data to file

Parameters:
string$datato write

Definition at line 47 of file core_functions.php.

        {
                $this->wfp = fopen($this->name,"wb");
                fwrite($this->wfp,$data);
                fclose($this->wfp);
        }

Field Documentation

$contents [private]

Definition at line 33 of file core_functions.php.

$name

Definition at line 29 of file core_functions.php.

$rfp [private]

Definition at line 31 of file core_functions.php.

$wfp [private]

Definition at line 32 of file core_functions.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables