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

Public Member Functions | |
| __construct ($browser, $context) | |
| get_params () | |
| get_visible_name () | |
| is_directory () | |
| get_children () | |
| get_parent () | |
| get_params_rawencoded () | |
| get_url ($forcedownload=false, $https=false) | |
| is_readable () | |
| is_writable () | |
| is_empty_area () | |
| get_filesize () | |
| get_mimetype () | |
| get_timecreated () | |
| get_timemodified () | |
| get_license () | |
| get_author () | |
| get_source () | |
| get_sortorder () | |
| 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 | |
| $context | |
| $browser | |
Definition at line 38 of file file_info.php.
| __construct | ( | $ | browser, |
| $ | context | ||
| ) |
Reimplemented in file_info_context_system.
Definition at line 44 of file file_info.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 in file_info_stored.
Definition at line 282 of file file_info.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 | $component | |
| string | $filearea | |
| int | $itemid | |
| string | $filepath | |
| string | $filename |
Reimplemented in file_info_stored.
Definition at line 273 of file file_info.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 in file_info_stored.
Definition at line 215 of file file_info.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 in file_info_stored.
Definition at line 239 of file file_info.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 | dile id or stored_file of file | |
| int | id of author, default $USER->id |
Reimplemented in file_info_stored.
Definition at line 251 of file file_info.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 in file_info_stored.
Definition at line 227 of file file_info.php.
| delete | ( | ) |
Delete file, make sure file is deletable first.
Reimplemented in file_info_stored.
Definition at line 259 of file file_info.php.
| get_author | ( | ) |
Returns the author name of the file
Reimplemented in file_info_stored.
Definition at line 188 of file file_info.php.
| get_children | ( | ) | [abstract] |
Returns list of children.
Reimplemented in file_info_area_backup_section, file_info_area_course_section, file_info_area_course_legacy, file_info_context_course, imscp_file_info, file_info_stored, file_info_context_user, file_info_context_module, file_info_context_coursecat, workshop_file_info_submissions_container, and file_info_context_system.

| get_filesize | ( | ) |
Returns file size in bytes, null for directories
Reimplemented in file_info_stored.
Definition at line 148 of file file_info.php.
| get_license | ( | ) |
Returns the license type of the file
Reimplemented in file_info_stored.
Definition at line 180 of file file_info.php.
| get_mimetype | ( | ) |
Returns mimetype
Reimplemented in file_info_stored.
Definition at line 156 of file file_info.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 in file_info_area_backup_section, file_info_area_course_section, imscp_file_info, file_info_stored, and workshop_file_info_submissions_container.
Definition at line 55 of file file_info.php.

Returns array of url encoded params.
Definition at line 92 of file file_info.php.

| get_parent | ( | ) | [abstract] |
Returns parent file_info instance
Reimplemented in file_info_area_backup_section, file_info_area_course_section, resource_content_file_info, file_info_context_course, imscp_file_info, file_info_stored, file_info_context_user, file_info_context_module, file_info_context_coursecat, file_info_context_system, workshop_file_info_submissions_container, scorm_package_file_info, page_content_file_info, and folder_content_file_info.

| get_sortorder | ( | ) |
Returns the sort order of the file
Reimplemented in file_info_stored.
Definition at line 204 of file file_info.php.
| get_source | ( | ) |
Returns the source of the file
Reimplemented in file_info_stored.
Definition at line 196 of file file_info.php.
| get_timecreated | ( | ) |
Returns time created unix timestamp if known
Reimplemented in file_info_stored.
Definition at line 164 of file file_info.php.
| get_timemodified | ( | ) |
Returns time modified unix timestamp if known
Reimplemented in file_info_stored.
Definition at line 172 of file file_info.php.
| get_url | ( | $ | forcedownload = false, |
| $ | https = false |
||
| ) |
Returns file download url
| bool | $forcedownload | |
| bool | $htts | force https |
Reimplemented in file_info_area_course_legacy, and file_info_stored.
Definition at line 111 of file file_info.php.
| get_visible_name | ( | ) | [abstract] |
Returns localised visible name.
Reimplemented in file_info_area_backup_section, file_info_area_course_section, resource_content_file_info, file_info_context_course, imscp_file_info, file_info_context_user, file_info_context_module, file_info_context_coursecat, file_info_stored, workshop_file_info_submissions_container, file_info_context_system, scorm_package_file_info, page_content_file_info, and folder_content_file_info.

| is_directory | ( | ) | [abstract] |
Is directory?
Reimplemented in file_info_area_backup_section, file_info_area_course_section, file_info_context_course, imscp_file_info, file_info_context_user, file_info_context_module, file_info_stored, file_info_context_coursecat, workshop_file_info_submissions_container, and file_info_context_system.
| is_empty_area | ( | ) |
Is this info area and is it "empty"? Are there any files in subfolders?
This is used mostly in repositories to reduce the number of empty folders. This method may be very slow, use with care.
Reimplemented in file_info_area_backup_section, file_info_area_course_section, file_info_context_module, and file_info_stored.
Definition at line 140 of file file_info.php.
| is_readable | ( | ) |
Can I read content of this file or enter directory?
Reimplemented in file_info_stored.
Definition at line 119 of file file_info.php.
| is_writable | ( | ) |
Can I add new files or directories?
Reimplemented in file_info_area_backup_section, file_info_area_course_section, file_info_context_course, imscp_file_info, file_info_context_user, file_info_context_module, file_info_stored, file_info_context_coursecat, workshop_file_info_submissions_container, and file_info_context_system.
Definition at line 127 of file file_info.php.
$browser [protected] |
Definition at line 42 of file file_info.php.
$context [protected] |
Definition at line 40 of file file_info.php.