Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Utility class for browsing of system files.

Copyright: 2008 Petr Skoda (http://skodak.org)
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 152 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

file_info_context_system:: (7 methods):
  __construct()
  get_file_info()
  get_area_backup_course()
  get_visible_name()
  is_writable()
  is_directory()
  get_parent()


Class: file_info_context_system  - X-Ref

Represents the system context in the tree navigated by {@link file_browser}.

__construct($browser, $context)   X-Ref
Constructor

param: file_browser $browser file_browser instance
param: stdClass $context context object

get_file_info($component, $filearea, $itemid, $filepath, $filename)   X-Ref
Return information about this specific part of context level

param: string $component component
param: string $filearea file area
param: int $itemid item ID
param: string $filepath file path
param: string $filename file name
return: file_info|null file_info instance or null if not found or access not allowed

get_area_backup_course($itemid, $filepath, $filename)   X-Ref
Gets a stored file for the backup course filearea directory.

param: int $itemid item ID
param: string $filepath file path
param: string $filename file name
return: file_info|null file_info instance or null if not found or access not allowed

get_visible_name()   X-Ref
Returns localised visible name.

return: string

is_writable()   X-Ref
Whether or not new files or directories can be added

return: bool

is_directory()   X-Ref
Whether or not this is a directory

return: bool

get_parent()   X-Ref
Returns parent file_info instance

return: file_info|null file_info instance or null for root