Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

(no description)

Copyright: 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 103 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

backup_file_manager:: (3 methods):
  get_backup_storage_base_dir()
  get_backup_content_file_location()
  copy_file_moodle2backup()


Class: backup_file_manager  - X-Ref

Collection of helper functions to handle files

This class implements various functions related with moodle storage
handling (get file from storage, put it there...) and some others
to use the zip/unzip facilities.

Note: It's supposed that, some day, files implementation will offer
those functions without needeing to know storage internals at all.
That day, we'll move related functions here to proper file api ones.

TODO: Finish phpdocs
get_backup_storage_base_dir($backupid)   X-Ref
Returns the full path to backup storage base dir


get_backup_content_file_location($contenthash)   X-Ref
Given one file content hash, returns the path (relative to filedir)
to the file.


copy_file_moodle2backup($backupid, $filerecorid)   X-Ref
Copy one file from moodle storage to backup storage