|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct (file_browser $browser, $context, $storedfile, $urlbase, $topvisiblename, $itemidused, $readaccess, $writeaccess, $areaonly) | |
| get_params () | |
| get_visible_name () | |
| get_url ($forcedownload=false, $https=false) | |
| is_readable () | |
| is_writable () | |
| is_empty_area () | |
| get_filesize () | |
| get_mimetype () | |
| get_timecreated () | |
| get_timemodified () | |
| is_directory () | |
| get_license () | |
| get_author () | |
| get_source () | |
| get_sortorder () | |
| get_children () | |
| get_parent () | |
| create_directory ($newdirname, $userid=NULL) | |
| create_file_from_string ($newfilename, $content, $userid=NULL) | |
| create_file_from_pathname ($newfilename, $pathname, $userid=NULL) | |
| create_file_from_storedfile ($newfilename, $fid, $userid=NULL) | |
| delete () | |
| copy_to_storage ($contextid, $component, $filearea, $itemid, $filepath, $filename) | |
| copy_to_pathname ($pathname) | |
Protected Attributes | |
| $lf | |
| $urlbase | |
| $topvisiblename | |
| $itemidused | |
| $readaccess | |
| $writeaccess | |
| $areaonly | |
Definition at line 39 of file file_info_stored.php.
| __construct | ( | file_browser $ | browser, |
| $ | context, | ||
| $ | storedfile, | ||
| $ | urlbase, | ||
| $ | topvisiblename, | ||
| $ | itemidused, | ||
| $ | readaccess, | ||
| $ | writeaccess, | ||
| $ | areaonly | ||
| ) |
Constructor
| file_browser | $browser | |
| stdClass | $context | |
| stored_file | virtual_root_file | $storedfile | |
| string | $urlbase | the serving script - usually the $CFG->wwwroot/.'pluginfile.php' |
| string | $topvisiblename | the human readable name of this area |
| int | bool | $itemidused | false if itemid always 0 and not included in URL |
| bool | $readaccess | allow file reading |
| bool | $writeaccess | allow file write, delete |
| string | $areaonly | do not show links to parent context/area |
Definition at line 61 of file file_info_stored.php.
| copy_to_pathname | ( | $ | pathname | ) |
Copy content of this file to local storage, overriding current file if needed.
| string | $pathname | real local full file name |
Reimplemented from file_info.
Definition at line 514 of file file_info_stored.php.

| copy_to_storage | ( | $ | contextid, |
| $ | component, | ||
| $ | filearea, | ||
| $ | itemid, | ||
| $ | filepath, | ||
| $ | filename | ||
| ) |
Copy content of this file to local storage, overriding current file if needed.
| int | $contextid | |
| string | $filearea | |
| int | $itemid | |
| string | $filepath | |
| string | $filename |
Reimplemented from file_info.
Definition at line 494 of file file_info_stored.php.

| create_directory | ( | $ | newdirname, |
| $ | userid = NULL |
||
| ) |
Create new directory, may throw exception - make sure params are valid.
| string | $newdirname | name of new directory |
| int | id of author, default $USER->id |
Reimplemented from file_info.
Definition at line 303 of file file_info_stored.php.

| create_file_from_pathname | ( | $ | newfilename, |
| $ | pathname, | ||
| $ | userid = NULL |
||
| ) |
Create new file from pathname - make sure params are valid.
| string | $newfilename | name of new file |
| string | $pathname | location of file |
| int | id of author, default $USER->id |
Reimplemented from file_info.
Definition at line 378 of file file_info_stored.php.

| create_file_from_storedfile | ( | $ | newfilename, |
| $ | fid, | ||
| $ | userid = NULL |
||
| ) |
Create new file from stored file - make sure params are valid.
| string | $newfilename | name of new file |
| mixed | file id or stored_file of file | |
| int | id of author, default $USER->id |
Reimplemented from file_info.
Definition at line 424 of file file_info_stored.php.

| create_file_from_string | ( | $ | newfilename, |
| $ | content, | ||
| $ | userid = NULL |
||
| ) |
Create new file from string - make sure params are valid.
| string | $newfilename | name of new file |
| string | $content | of file |
| int | id of author, default $USER->id |
Reimplemented from file_info.
Definition at line 332 of file file_info_stored.php.

| delete | ( | ) |
Delete file, make sure file is deletable first.
Reimplemented from file_info.
Definition at line 466 of file file_info_stored.php.

| get_author | ( | ) |
Returns the author name of the file
Reimplemented from file_info.
Definition at line 225 of file file_info_stored.php.
| get_children | ( | ) |
Returns list of children.
Reimplemented from file_info.
Reimplemented in file_info_area_course_legacy.
Definition at line 249 of file file_info_stored.php.

| get_filesize | ( | ) |
Returns file size in bytes, null for directories
Reimplemented from file_info.
Definition at line 177 of file file_info_stored.php.
| get_license | ( | ) |
Returns the license type of the file
Reimplemented from file_info.
Definition at line 217 of file file_info_stored.php.
| get_mimetype | ( | ) |
Returns mimetype
Reimplemented from file_info.
Definition at line 185 of file file_info_stored.php.
| get_params | ( | ) |
Returns list of standard virtual file/directory identification. The difference from stored_file parameters is that null values are allowed in all fields
Reimplemented from file_info.
Definition at line 79 of file file_info_stored.php.
| get_parent | ( | ) |
Returns parent file_info instance
Reimplemented from file_info.
Reimplemented in resource_content_file_info, scorm_package_file_info, page_content_file_info, and folder_content_file_info.
Definition at line 271 of file file_info_stored.php.
| get_sortorder | ( | ) |
Returns the sort order of the file
Reimplemented from file_info.
Definition at line 241 of file file_info_stored.php.
| get_source | ( | ) |
Returns the source of the file
Reimplemented from file_info.
Definition at line 233 of file file_info_stored.php.
| get_timecreated | ( | ) |
Returns time created unix timestamp if known
Reimplemented from file_info.
Definition at line 193 of file file_info_stored.php.
| get_timemodified | ( | ) |
Returns time modified unix timestamp if known
Reimplemented from file_info.
Definition at line 201 of file file_info_stored.php.
| get_url | ( | $ | forcedownload = false, |
| $ | https = false |
||
| ) |
Returns file download url
| bool | $forcedownload | |
| bool | $htts | force https |
Reimplemented from file_info.
Reimplemented in file_info_area_course_legacy.
Definition at line 117 of file file_info_stored.php.

| get_visible_name | ( | ) |
Returns localised visible name.
Reimplemented from file_info.
Reimplemented in resource_content_file_info, scorm_package_file_info, page_content_file_info, and folder_content_file_info.
Definition at line 92 of file file_info_stored.php.
| is_directory | ( | ) |
Is directory?
Reimplemented from file_info.
Definition at line 209 of file file_info_stored.php.

| is_empty_area | ( | ) |
Is this top of empty area?
Reimplemented from file_info.
Definition at line 163 of file file_info_stored.php.

| is_readable | ( | ) |
Can I read content of this file or enter directory?
Reimplemented from file_info.
Definition at line 146 of file file_info_stored.php.

| is_writable | ( | ) |
Can I add new files or directories?
Reimplemented from file_info.
Definition at line 154 of file file_info_stored.php.

$areaonly [protected] |
Definition at line 46 of file file_info_stored.php.
$itemidused [protected] |
Definition at line 43 of file file_info_stored.php.
$lf [protected] |
Definition at line 40 of file file_info_stored.php.
$readaccess [protected] |
Definition at line 44 of file file_info_stored.php.
$topvisiblename [protected] |
Definition at line 42 of file file_info_stored.php.
$urlbase [protected] |
Definition at line 41 of file file_info_stored.php.
$writeaccess [protected] |
Definition at line 45 of file file_info_stored.php.