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.

(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: 2 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