Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

File Size: 51 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

FileSystemHelperInterface:: (4 methods):
  createFolder()
  createFileWithContents()
  deleteFile()
  deleteFolderRecursively()


Interface: FileSystemHelperInterface  - X-Ref

Class FileSystemHelperInterface
This interface describes helper functions to help with the file system operations
like files/folders creation & deletion

createFolder($parentFolderPath, $folderName)   X-Ref
Creates an empty folder with the given name under the given parent folder.

return: string Path of the created folder
param: string $parentFolderPath The parent folder path under which the folder is going to be created
param: string $folderName The name of the folder to create

createFileWithContents($parentFolderPath, $fileName, $fileContents)   X-Ref
Creates a file with the given name and content in the given folder.
The parent folder must exist.

return: string Path of the created file
param: string $parentFolderPath The parent folder path where the file is going to be created
param: string $fileName The name of the file to create
param: string $fileContents The contents of the file to create

deleteFile($filePath)   X-Ref
Delete the file at the given path

return: void
param: string $filePath Path of the file to delete

deleteFolderRecursively($folderPath)   X-Ref
Delete the folder at the given path as well as all its contents

return: void
param: string $folderPath Path of the folder to delete