|
| __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) |
|
| XoopsFileHandler ($path, $create=false, $mode=0755) |
|
Definition at line 53 of file file.php.
XoopsFileHandler::__construct |
( |
|
$path, |
|
|
|
$create = false , |
|
|
|
$mode = 0755 |
|
) |
| |
Constructor
- Parameters
-
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 private |
Definition at line 103 of file file.php.
References $path, XoopsFile\getHandler(), and XoopsLoad\load().
XoopsFileHandler::__destruct |
( |
| ) |
|
Closes the current file if it is opened
private
Definition at line 138 of file file.php.
XoopsFileHandler::append |
( |
|
$data, |
|
|
|
$force = false |
|
) |
| |
Append given data string to this File.
- Parameters
-
string | $data | Data to write |
string | $force | force the file to open |
- Returns
- boolean Success public
Definition at line 297 of file file.php.
XoopsFileHandler::close |
( |
| ) |
|
Closes the current file if it is opened.
- Returns
- boolean True if closing was successful or file was already closed, otherwise false public
Definition at line 308 of file file.php.
XoopsFileHandler::create |
( |
| ) |
|
Creates the File.
- Returns
- boolean Success public
Definition at line 149 of file file.php.
References $dir.
XoopsFileHandler::delete |
( |
| ) |
|
Deletes the File.
- Returns
- boolean Success public
Definition at line 322 of file file.php.
XoopsFileHandler::executable |
( |
| ) |
|
Returns true if the File is executable.
- Returns
- boolean true if its executable, false otherwise public
Definition at line 490 of file file.php.
XoopsFileHandler::exists |
( |
| ) |
|
Returns true if the File exists.
- Returns
- boolean true if it exists, false otherwise public
Definition at line 438 of file file.php.
XoopsFileHandler::ext |
( |
| ) |
|
Returns the File extension.
- Returns
- string The File extension public
Definition at line 353 of file file.php.
& XoopsFileHandler::folder |
( |
| ) |
|
Returns the current folder.
- Returns
- Folder Current folder public
Definition at line 567 of file file.php.
XoopsFileHandler::group |
( |
| ) |
|
Returns the File group.
- Returns
- integer the Filegroup public
Definition at line 525 of file file.php.
XoopsFileHandler::info |
( |
| ) |
|
Returns the File extension.
- Returns
- string The File extension public
Definition at line 336 of file file.php.
XoopsFileHandler::lastAccess |
( |
| ) |
|
Returns last access time.
- Returns
- integer timestamp Timestamp of last access time public
Definition at line 539 of file file.php.
XoopsFileHandler::lastChange |
( |
| ) |
|
Returns last modified time.
- Returns
- integer timestamp Timestamp of last modification public
Definition at line 553 of file file.php.
XoopsFileHandler::md5 |
( |
|
$maxsize = 5 | ) |
|
Get md5 Checksum of file with previous check of Filesize
- Parameters
-
mixed | $maxsize | in MB or true to force |
- Returns
- string md5 Checksum See md5_file() public
Definition at line 408 of file file.php.
XoopsFileHandler::name |
( |
| ) |
|
Returns the File name without extension.
- Returns
- string The File name without extension. public
Definition at line 370 of file file.php.
XoopsFileHandler::offset |
( |
|
$offset = false , |
|
|
|
$seek = SEEK_SET |
|
) |
| |
Sets or gets the offset for the currently opened file.
- Parameters
-
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 |
- Returns
- mixed True on success, false on failure (set mode), false on failure or integer offset on success (get mode) public
Definition at line 229 of file file.php.
XoopsFileHandler::open |
( |
|
$mode = 'r' , |
|
|
|
$force = false |
|
) |
| |
Opens the current file with a given $mode
- Parameters
-
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 |
- Returns
- boolean True on success, false on failure public
Definition at line 168 of file file.php.
XoopsFileHandler::owner |
( |
| ) |
|
Returns the File's owner.
- Returns
- integer the Fileowner
Definition at line 511 of file file.php.
XoopsFileHandler::perms |
( |
| ) |
|
Returns the "chmod" (permissions) of the File.
- Returns
- string Permissions for the file public
Definition at line 450 of file file.php.
XoopsFileHandler::prepare |
( |
|
$data | ) |
|
Prepares a ascii string for writing fixes line endings
- Parameters
-
string | $data | Data to prepare for writing. |
- Returns
- string public
Definition at line 249 of file file.php.
XoopsFileHandler::pwd |
( |
| ) |
|
Returns the full path of the File.
- Returns
- string Full path to file public
Definition at line 427 of file file.php.
XoopsFileHandler::read |
( |
|
$bytes = false , |
|
|
|
$mode = 'rb' , |
|
|
|
$force = false |
|
) |
| |
Return the contents of this File as a string.
- Parameters
-
string | $bytes | where to start |
string | $mode | |
boolean | $force | If true then the file will be re-opened even if its already opened, otherwise it won't |
- Returns
- mixed string on success, false on failure public
Definition at line 194 of file file.php.
XoopsFileHandler::readable |
( |
| ) |
|
Returns true if the File is readable.
- Returns
- boolean true if file is readable, false otherwise public
Definition at line 501 of file file.php.
XoopsFileHandler::safe |
( |
|
$name = null , |
|
|
|
$ext = null |
|
) |
| |
makes filename safe for saving
- Parameters
-
string | $name | the name of the file to make safe if different from $this->name |
- Returns
- string $ext the extension of the file public
Definition at line 390 of file file.php.
References $ext.
XoopsFileHandler::size |
( |
| ) |
|
Returns the Filesize, either in bytes or in human-readable format.
- Parameters
-
boolean | $humanReadeble | Data to write to this File. |
- Returns
- string |int filesize as int or as a human-readable string public
Definition at line 465 of file file.php.
XoopsFileHandler::writable |
( |
| ) |
|
Returns true if the File is writable.
- Returns
- boolean true if its writable, false otherwise public
Definition at line 479 of file file.php.
XoopsFileHandler::write |
( |
|
$data, |
|
|
|
$mode = 'w' , |
|
|
|
$force = false |
|
) |
| |
Write given data to this File.
- Parameters
-
string | $data | Data to write to this File. |
string | $mode | Mode of writing. See fwrite(). |
string | $force | force the file to open |
- Returns
- boolean Success public
Definition at line 270 of file file.php.
XoopsFileHandler::XoopsFileHandler |
( |
|
$path, |
|
|
|
$create = false , |
|
|
|
$mode = 0755 |
|
) |
| |
XoopsFileHandler::$folder = null |
XoopsFileHandler::$handle = null |
XoopsFileHandler::$info = array() |
XoopsFileHandler::$lock = null |
XoopsFileHandler::$name = null |
The documentation for this class was generated from the following file:
- L:/0xoops/xoops-2.5.6/htdocs/class/file/file.php