Represents the root directory of an empty file area in the tree navigated by file_browser.
More...
|
| __construct ($contextid, $component, $filearea, $itemid) |
| Constructor.
|
|
| add_to_curl_request (&$curlrequest, $key) |
| adds this file path to a curl request (POST only)
|
|
| archive_file (file_archive $filearch, $archivepath) |
| Add file/directory into archive.
|
|
| copy_content_to ($pathname) |
| Copy content of file to given pathname.
|
|
| delete () |
| Delete file.
|
|
| extract_to_pathname (file_packer $packer, $pathname) |
| Extract file to given file path (real OS filesystem), existing files are overwrited.
|
|
| 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.
|
|
| get_author () |
| Returns file's author.
|
|
| get_component () |
| Returns file component.
|
|
| get_content () |
| Returns file content as string.
|
|
| get_content_file_handle () |
| Returns file handle - read only mode, no writing allowed into pool files!
|
|
| get_contenthash () |
| Returns sha1 hash code.
|
|
| get_contextid () |
| Returns context ID.
|
|
| get_filearea () |
| Returns file area.
|
|
| get_filename () |
| Returns file name.
|
|
| get_filepath () |
| Returns file path.
|
|
| get_filesize () |
| Returns file size.
|
|
| get_id () |
| Returns ID.
|
|
| get_itemid () |
| Returns file itemid.
|
|
| get_license () |
| Returns license.
|
|
| get_mimetype () |
| Returns mimetype.
|
|
| get_parent_directory () |
| Returns parent directory.
|
|
| get_pathnamehash () |
| Returns path name hash.
|
|
| get_sortorder () |
| Returns file sort order.
|
|
| get_source () |
| Returns file source.
|
|
| get_status () |
| Returns status.
|
|
| get_timecreated () |
| Returns time created.
|
|
| get_timemodified () |
| Returns time modified.
|
|
| get_userid () |
| Returns user ID.
|
|
| is_directory () |
| Whether or not this is a directory.
|
|
| list_files (file_packer $packer) |
| List contents of archive.
|
|
| readfile () |
| Dumps file content to page.
|
|
|
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:
- lib/filebrowser/virtual_root_file.php