2024.8.23
|
Public Member Functions | |
__construct ($args) | |
Handles the action of clearing specific temporary folders within the application.
This class is responsible for clearing out temporary files and directories that are not essential for immediate functionality but may accumulate over time and use disk space. It targets temporary directories used by various components like Composer, OpenSSL, and others.
Definition at line 17 of file class.action.clearFolders.php.
ActionClearFolders::__construct | ( | $args | ) |
Constructor for the ActionClearFolders class.
Upon instantiation, it clears specified temporary folders in both the root and core temporary paths. It excludes certain files and folders from being deleted to prevent essential data loss.
array | $args | Arguments that might be used for further extension of constructor functionality. |
Clears specific temporary folders in the root temporary path.
Util\clearFolder is used to clear the contents of the root temporary path, excluding certain essential items such as 'cachegrind', 'composer', 'openssl', 'mailpit', 'xlight', 'npm-cache', 'pip', 'yarn', and '.gitignore'. This ensures that important data and configurations are not lost.
string | $bearsamppRoot-,>getTmpPath() | The root temporary path to be cleared. |
array | $exclusions | List of folders and files to be excluded from deletion. |
Clears the core temporary path.
Util\clearFolder is used to clear the contents of the core temporary path, excluding the '.gitignore' file. This ensures that the core temporary path is cleaned without removing the '.gitignore' file which might be necessary for version control.
string | $bearsamppCore-,>getTmpPath() | The core temporary path to be cleared. |
array | $exclusions | List of folders and files to be excluded from deletion. |
Definition at line 27 of file class.action.clearFolders.php.
References $bearsamppCore, $bearsamppRoot, and Util\clearFolder().