OpenSencillo
2015.002
|
Public Member Functions | |
__construct ($name) | |
write ($data) | |
read () | |
Data Fields | |
$name | |
Private Attributes | |
$rfp | |
$wfp | |
$contents |
Definition at line 27 of file core_functions.php.
__construct | ( | $ | name | ) |
fileSystem constructor - create object for file manipulation
string | $name |
Reimplemented in file.
Definition at line 39 of file core_functions.php.
{ $this->name = $name; }
read | ( | ) | [final] |
Read file from file
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
string | $data | to write |
Definition at line 47 of file core_functions.php.
{
$this->wfp = fopen($this->name,"wb");
fwrite($this->wfp,$data);
fclose($this->wfp);
}
$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.