Summary
- File
- Package hierarchy Helper
- Class hierarchy \FileSystemHelper
File System helper
File System helper
remove_folder(string $folder, boolean $protect_folder = false, string $first_folder_name = '', string $parent_folder = '') : boolean
Remove a folder and its content. The folder can be kept and only emptied.
string | $folder | The name of the folder to delete. |
boolean | $protect_folder | True if the original folder has to be kept. False per default. |
string | $first_folder_name | The name of the first folder if it has to be kept. No need to fill it, used for recursive matter. |
string | $parent_folder | The name of the parent folder. No need to fill it, used for recursive matter. |
True if the folder is successfully removed, otherwise false.
None found |
copy_folder(string $source_path, string $destination_path)
Copy a folder from a source path to a destination.
string | $source_path | Source path of the folder. |
string | $destination_path | Destination path of the folder. |
None found |
download_remote_file(string $url, string $destination_path, string $extract_archive = true, string $retry = false) : boolean
Download a file from a remote url with md5 sum check and extract it if needed in case of a zip file. Curl library needed.
string | $url | Url of the remote file. |
string | $destination_path | Destination path of the file. |
string | $extract_archive | Extract the content of the zip file and delete the zip file if true. |
string | $retry | Second try if the archive is corrupted. No need to use this parameter, it is used automatically by the function. |
True if the file is successfully downloaded, otherwise false.
None found |