Свойство | Type | Description | |
---|---|---|---|
$baseFolderRealPath | Real path of the base folder where all the I/O can occur |
Méthode | Description | |
---|---|---|
__construct ( string $baseFolderPath ) | ||
createFileWithContents ( string $parentFolderPath, string $fileName, string $fileContents ) : string | Creates a file with the given name and content in the given folder. | |
createFolder ( string $parentFolderPath, string $folderName ) : string | Creates an empty folder with the given name under the given parent folder. | |
deleteFile ( string $filePath ) : void | Delete the file at the given path | |
deleteFolderRecursively ( string $folderPath ) : void | Delete the folder at the given path as well as all its contents |
Méthode | Description | |
---|---|---|
throwIfOperationNotInBaseFolder ( string $operationFolderPath ) : void | All I/O operations must occur inside the base folder, for security reasons. |
public __construct ( string $baseFolderPath ) | ||
$baseFolderPath | string | The path of the base folder where all the I/O can occur |
public createFileWithContents ( string $parentFolderPath, string $fileName, string $fileContents ) : string | ||
$parentFolderPath | string | The parent folder path where the file is going to be created |
$fileName | string | The name of the file to create |
$fileContents | string | The contents of the file to create |
Résultat | string | Path of the created file |
public deleteFile ( string $filePath ) : void | ||
$filePath | string | Path of the file to delete |
Résultat | void |
public deleteFolderRecursively ( string $folderPath ) : void | ||
$folderPath | string | Path of the folder to delete |
Résultat | void |
protected throwIfOperationNotInBaseFolder ( string $operationFolderPath ) : void | ||
$operationFolderPath | string | The path of the folder where the I/O operation should occur |
Résultat | void |