Function __global->cms_is_writable
Definitions
sources/global3.php
- Find whether a file/directory is writeable. This function is designed to get past that the PHP is_writable function does not work properly on Windows.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | PATH | No | No | required parameter | N/A | N/A | The file path |
| $aggressive | boolean | No | No | False | N/A | N/A | Whether to perform an aggressive test (if necessary) where we actually try writing to the file |
Returns
- Whether the file is writeable
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find whether a file/directory is writeable. This function is designed to get past that the PHP is_writable function does not work properly on Windows.
*
* @param PATH $path The file path
* @param boolean $aggressive Whether to perform an aggressive test (if necessary) where we actually try writing to the file
* @return boolean Whether the file is writeable
*/
function cms_is_writable(string $path, bool $aggressive = false) : bool
* Find whether a file/directory is writeable. This function is designed to get past that the PHP is_writable function does not work properly on Windows.
*
* @param PATH $path The file path
* @param boolean $aggressive Whether to perform an aggressive test (if necessary) where we actually try writing to the file
* @return boolean Whether the file is writeable
*/
function cms_is_writable(string $path, bool $aggressive = false) : bool

