XOOPS
2.6.0
|
Public Member Functions | |
__construct ($path, $create=false, $mode=0755) | |
__destruct () | |
append ($data, $force=false) | |
close () | |
create () | |
delete () | |
executable () | |
exists () | |
ext () | |
folder () | |
group () | |
info () | |
lastAccess () | |
lastChange () | |
md5 ($maxsize=5) | |
name () | |
offset ($offset=false, $seek=SEEK_SET) | |
open ($mode= 'r', $force=false) | |
owner () | |
perms () | |
prepare ($data) | |
pwd () | |
read ($bytes=false, $mode= 'rb', $force=false) | |
readable () | |
safe ($name=null, $ext=null) | |
size () | |
writable () | |
write ($data, $mode= 'w', $force=false) | |
Public Attributes | |
$folder = null | |
$handle = null | |
$info = array() | |
$lock = null | |
$name = null | |
XoopsFileHandler::__construct | ( | $path, | |
$create = false , |
|||
$mode = 0755 |
|||
) |
Constructor
string | $path | Path to file |
boolean | $create | Create file if it does not exist (if true) |
integer | $mode | Mode to apply to the folder holding the file |
public
Definition at line 88 of file file.php.
References $path, create(), exists(), folder(), XoopsFile\getHandler(), name(), and safe().
XoopsFileHandler::__destruct | ( | ) |
XoopsFileHandler::append | ( | $data, | |
$force = false |
|||
) |
XoopsFileHandler::close | ( | ) |
Closes the current file if it is opened.
Definition at line 291 of file file.php.
Referenced by __destruct().
XoopsFileHandler::create | ( | ) |
XoopsFileHandler::delete | ( | ) |
XoopsFileHandler::executable | ( | ) |
XoopsFileHandler::exists | ( | ) |
Returns true if the File exists.
Definition at line 423 of file file.php.
References pwd().
Referenced by __construct(), create(), delete(), group(), lastAccess(), lastChange(), open(), owner(), perms(), and size().
XoopsFileHandler::ext | ( | ) |
XoopsFileHandler::folder | ( | ) |
Returns the current folder.
Definition at line 551 of file file.php.
References $folder.
Referenced by __construct(), create(), and pwd().
XoopsFileHandler::group | ( | ) |
XoopsFileHandler::info | ( | ) |
XoopsFileHandler::lastAccess | ( | ) |
XoopsFileHandler::lastChange | ( | ) |
XoopsFileHandler::md5 | ( | $maxsize = 5 | ) |
Get md5 Checksum of file with previous check of Filesize
integer | $maxsize | in MB or true to force |
Definition at line 393 of file file.php.
XoopsFileHandler::name | ( | ) |
XoopsFileHandler::offset | ( | $offset = false , |
|
$seek = SEEK_SET |
|||
) |
Sets or gets the offset for the currently opened file.
mixed | $offset | The $offset in bytes to seek. If set to false then the current offset is returned. |
integer | $seek | PHP Constant SEEK_SET | SEEK_CUR | SEEK_END determining what the $offset is relative to |
Definition at line 210 of file file.php.
References open().
XoopsFileHandler::open | ( | $mode = 'r' , |
|
$force = false |
|||
) |
Opens the current file with a given $mode
string | $mode | A valid 'fopen' mode string (r|w|a ...) |
boolean | $force | If true then the file will be re-opened even if its already opened, otherwise it won't |
Definition at line 144 of file file.php.
References create(), exists(), and pwd().
Referenced by offset(), read(), and write().
XoopsFileHandler::owner | ( | ) |
XoopsFileHandler::perms | ( | ) |
XoopsFileHandler::prepare | ( | $data | ) |
XoopsFileHandler::pwd | ( | ) |
Returns the full path of the File.
Definition at line 412 of file file.php.
References folder(), and name().
Referenced by create(), delete(), executable(), exists(), group(), info(), lastAccess(), lastChange(), md5(), open(), owner(), perms(), read(), readable(), size(), and writable().
Return the contents of this File as a string.
string | bool | $bytes | where to start |
string | $mode | mode of file access |
boolean | $force | If true then the file will be re-opened even if its already opened, otherwise it won't |
Definition at line 171 of file file.php.
XoopsFileHandler::readable | ( | ) |
XoopsFileHandler::safe | ( | $name = null , |
|
$ext = null |
|||
) |
makes filename safe for saving
string | $name | the name of the file to make safe if different from $this->name |
string | $ext | the extension of the file |
Definition at line 374 of file file.php.
References $ext, $name, and ext().
Referenced by __construct().
XoopsFileHandler::size | ( | ) |
Returns the Filesize, either in bytes or in human-readable format.
Definition at line 449 of file file.php.
References exists(), and pwd().
Referenced by md5().
XoopsFileHandler::writable | ( | ) |
XoopsFileHandler::write | ( | $data, | |
$mode = 'w' , |
|||
$force = false |
|||
) |
Write given data to this File.
string | $data | Data to write to this File. |
string | $mode | Mode of writing. See fwrite(). |
bool | $force | force the file to open |
Definition at line 252 of file file.php.
References open().
Referenced by append().
XoopsFileHandler::$name = null |