Represents the root directory of an empty file area in the tree navigated by file_browser.
More...
|
| __construct ($contextid, $component, $filearea, $itemid) |
| Constructor. More...
|
|
| add_to_curl_request (&$curlrequest, $key) |
| adds this file path to a curl request (POST only) More...
|
|
| archive_file (file_archive $filearch, $archivepath) |
| Add file/directory into archive. More...
|
|
| copy_content_to ($pathname) |
| Copy content of file to given pathname. More...
|
|
| delete () |
| Delete file. More...
|
|
| extract_to_pathname (file_packer $packer, $pathname) |
| Extract file to given file path (real OS filesystem), existing files are overwrited. More...
|
|
| extract_to_storage (file_packer $packer, $contextid, $component, $filearea, $itemid, $pathbase, $userid=NULL) |
| Extract file to given file path (real OS filesystem), existing files are overwrited. More...
|
|
| get_author () |
| Returns file's author. More...
|
|
| get_component () |
| Returns file component. More...
|
|
| get_content () |
| Returns file content as string. More...
|
|
| get_content_file_handle () |
| Returns file handle - read only mode, no writing allowed into pool files! More...
|
|
| get_contenthash () |
| Returns sha1 hash code. More...
|
|
| get_contextid () |
| Returns context ID. More...
|
|
| get_filearea () |
| Returns file area. More...
|
|
| get_filename () |
| Returns file name. More...
|
|
| get_filepath () |
| Returns file path. More...
|
|
| get_filesize () |
| Returns file size. More...
|
|
| get_id () |
| Returns ID. More...
|
|
| get_itemid () |
| Returns file itemid. More...
|
|
| get_license () |
| Returns license. More...
|
|
| get_mimetype () |
| Returns mimetype. More...
|
|
| get_parent_directory () |
| Returns parent directory. More...
|
|
| get_pathnamehash () |
| Returns path name hash. More...
|
|
| get_sortorder () |
| Returns file sort order. More...
|
|
| get_source () |
| Returns file source. More...
|
|
| get_status () |
| Returns status. More...
|
|
| get_timecreated () |
| Returns time created. More...
|
|
| get_timemodified () |
| Returns time modified. More...
|
|
| get_userid () |
| Returns user ID. More...
|
|
| is_directory () |
| Whether or not this is a directory. More...
|
|
| list_files (file_packer $packer) |
| List contents of archive. More...
|
|
| readfile () |
| Dumps file content to page. More...
|
|
|
string | $component |
| file component
|
|
int | $contextid |
| context id
|
|
string | $filearea |
| file area
|
|
int | $itemid |
| file itemid
|
|
Represents the root directory of an empty file area in the tree navigated by file_browser.
- Copyright
- 2008 Petr Skoda (http://skodak.org)
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
virtual_root_file::__construct |
( |
|
$contextid, |
|
|
|
$component, |
|
|
|
$filearea, |
|
|
|
$itemid |
|
) |
| |
Constructor.
- Parameters
-
int | $contextid | context ID |
string | $component | component |
string | $filearea | file area |
int | $itemid | item ID |
◆ add_to_curl_request()
virtual_root_file::add_to_curl_request |
( |
& |
$curlrequest, |
|
|
|
$key |
|
) |
| |
adds this file path to a curl request (POST only)
- Parameters
-
curl | $curlrequest | the curl request object |
string | $key | what key to use in the POST request |
◆ archive_file()
virtual_root_file::archive_file |
( |
file_archive |
$filearch, |
|
|
|
$archivepath |
|
) |
| |
Add file/directory into archive.
- Parameters
-
file_archive | $filearch | file archive instance |
string | $archivepath | pathname in archive |
- Return values
-
◆ copy_content_to()
virtual_root_file::copy_content_to |
( |
|
$pathname | ) |
|
Copy content of file to given pathname.
- Parameters
-
string | $pathname | real path to new file |
- Return values
-
◆ delete()
virtual_root_file::delete |
( |
| ) |
|
Delete file.
- Return values
-
◆ extract_to_pathname()
virtual_root_file::extract_to_pathname |
( |
file_packer |
$packer, |
|
|
|
$pathname |
|
) |
| |
Extract file to given file path (real OS filesystem), existing files are overwrited.
- Parameters
-
file_packer | $packer | file packer instance |
string | $pathname | target directory |
- Return values
-
mixed | list of processed files; false if error |
◆ extract_to_storage()
virtual_root_file::extract_to_storage |
( |
file_packer |
$packer, |
|
|
|
$contextid, |
|
|
|
$component, |
|
|
|
$filearea, |
|
|
|
$itemid, |
|
|
|
$pathbase, |
|
|
|
$userid = NULL |
|
) |
| |
Extract file to given file path (real OS filesystem), existing files are overwrited.
- Parameters
-
file_packer | $packer | file packer instance |
int | $contextid | context ID |
string | $component | component |
string | $filearea | file area |
int | $itemid | item ID |
string | $pathbase | path base |
int | $userid | user ID |
- Return values
-
mixed | list of processed files; false if error |
◆ get_author()
virtual_root_file::get_author |
( |
| ) |
|
Returns file's author.
- Return values
-
◆ get_component()
virtual_root_file::get_component |
( |
| ) |
|
Returns file component.
- Return values
-
◆ get_content()
virtual_root_file::get_content |
( |
| ) |
|
Returns file content as string.
- Return values
-
◆ get_content_file_handle()
virtual_root_file::get_content_file_handle |
( |
| ) |
|
Returns file handle - read only mode, no writing allowed into pool files!
- Return values
-
◆ get_contenthash()
virtual_root_file::get_contenthash |
( |
| ) |
|
Returns sha1 hash code.
- Return values
-
◆ get_contextid()
virtual_root_file::get_contextid |
( |
| ) |
|
Returns context ID.
- Return values
-
◆ get_filearea()
virtual_root_file::get_filearea |
( |
| ) |
|
Returns file area.
- Return values
-
◆ get_filename()
virtual_root_file::get_filename |
( |
| ) |
|
Returns file name.
- Return values
-
◆ get_filepath()
virtual_root_file::get_filepath |
( |
| ) |
|
Returns file path.
- Return values
-
◆ get_filesize()
virtual_root_file::get_filesize |
( |
| ) |
|
Returns file size.
- Return values
-
◆ get_id()
virtual_root_file::get_id |
( |
| ) |
|
Returns ID.
- Return values
-
◆ get_itemid()
virtual_root_file::get_itemid |
( |
| ) |
|
Returns file itemid.
- Return values
-
◆ get_license()
virtual_root_file::get_license |
( |
| ) |
|
Returns license.
- Return values
-
◆ get_mimetype()
virtual_root_file::get_mimetype |
( |
| ) |
|
Returns mimetype.
- Return values
-
◆ get_parent_directory()
virtual_root_file::get_parent_directory |
( |
| ) |
|
Returns parent directory.
- Return values
-
◆ get_pathnamehash()
virtual_root_file::get_pathnamehash |
( |
| ) |
|
Returns path name hash.
- Return values
-
◆ get_sortorder()
virtual_root_file::get_sortorder |
( |
| ) |
|
Returns file sort order.
- Return values
-
◆ get_source()
virtual_root_file::get_source |
( |
| ) |
|
Returns file source.
- Return values
-
◆ get_status()
virtual_root_file::get_status |
( |
| ) |
|
Returns status.
- Return values
-
◆ get_timecreated()
virtual_root_file::get_timecreated |
( |
| ) |
|
Returns time created.
- Return values
-
◆ get_timemodified()
virtual_root_file::get_timemodified |
( |
| ) |
|
Returns time modified.
- Return values
-
◆ get_userid()
virtual_root_file::get_userid |
( |
| ) |
|
Returns user ID.
- Return values
-
◆ is_directory()
virtual_root_file::is_directory |
( |
| ) |
|
Whether or not this is a directory.
- Return values
-
◆ list_files()
List contents of archive.
- Parameters
-
- Return values
-
◆ readfile()
virtual_root_file::readfile |
( |
| ) |
|
Dumps file content to page.
- Return values
-
The documentation for this class was generated from the following file: