Public Member Functions | |
__construct ($path, $mode) | |
append ($file_name) | |
feof () | |
read ($size=1024) | |
write ($str) | |
open ($path, $mode) | |
getPath () | |
close () | |
Public Member Functions inherited from BaseObject | |
__construct ($error=0, $message= 'success') | |
setError ($error=0) | |
getError () | |
setHttpStatusCode ($code= '200') | |
getHttpStatusCode () | |
setMessage ($message= 'success', $type=NULL) | |
getMessage () | |
add ($key, $val) | |
adds ($object) | |
get ($key) | |
gets () | |
getVariables () | |
getObjectVars () | |
toBool () | |
toBoolean () | |
Public Attributes | |
$fp = NULL | |
$path = NULL | |
$mode = "r" | |
Public Attributes inherited from BaseObject | |
$error = 0 | |
$message = 'success' | |
$variables = array() | |
$httpStatusCode = NULL | |
File abstraction class
Definition at line 9 of file FileObject.class.php.
FileObject::__construct | ( | $path, | |
$mode | |||
) |
Constructor
string | $path | Path of target file |
string | $mode | File open mode |
Definition at line 37 of file FileObject.class.php.
FileObject::append | ( | $file_name | ) |
Append target file's content to current file
string | $file_name | Path of target file |
Definition at line 51 of file FileObject.class.php.
FileObject::close | ( | ) |
FileObject::feof | ( | ) |
Check current file meets eof
Definition at line 67 of file FileObject.class.php.
FileObject::getPath | ( | ) |
Return current file's path
Definition at line 134 of file FileObject.class.php.
FileObject::open | ( | $path, | |
$mode | |||
) |
Open a file
If file is opened, close it and open the new path
string | $path | Path of target file |
string | $mode | File open mode (http://php.net/manual/en/function.fopen.php) |
Definition at line 113 of file FileObject.class.php.
FileObject::read | ( | $size = 1024 | ) |
Read from current file
int | $size | Size to read |
Definition at line 78 of file FileObject.class.php.
FileObject::write | ( | $str | ) |
Write string to current file
string | $str | String to write |
Definition at line 89 of file FileObject.class.php.
FileObject::$fp = NULL |
Definition at line 16 of file FileObject.class.php.
FileObject::$mode = "r" |
Definition at line 28 of file FileObject.class.php.
FileObject::$path = NULL |
Definition at line 22 of file FileObject.class.php.