(no description)
File Size: | 164 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
FileSystemHelper:: (7 methods):
__construct()
getBaseFolderRealPath()
createFolder()
createFileWithContents()
deleteFile()
deleteFolderRecursively()
throwIfOperationNotInBaseFolder()
Class: FileSystemHelper - X-Ref
__construct(string $baseFolderPath) X-Ref |
param: string $baseFolderPath The path of the base folder where all the I/O can occur |
getBaseFolderRealPath() X-Ref |
No description |
createFolder(string $parentFolderPath, string $folderName) X-Ref |
Creates an empty folder with the given name under the given parent 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 return: string Path of the created folder |
createFileWithContents(string $parentFolderPath, string $fileName, string $fileContents) X-Ref |
Creates a file with the given name and content in the given folder. The parent folder must exist. 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 return: string Path of the created file |
deleteFile(string $filePath) X-Ref |
Delete the file at the given path. param: string $filePath Path of the file to delete |
deleteFolderRecursively(string $folderPath) X-Ref |
Delete the folder at the given path as well as all its contents. param: string $folderPath Path of the folder to delete |
throwIfOperationNotInBaseFolder(string $operationFolderPath) X-Ref |
All I/O operations must occur inside the base folder, for security reasons. This function will throw an exception if the folder where the I/O operation should occur is not inside the base folder. param: string $operationFolderPath The path of the folder where the I/O operation should occur |