Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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