deleteFile.php
Table of Contents
Functions
- deleteFile() : bool
- Deletes a file from the filesystem.
Functions
deleteFile()
Deletes a file from the filesystem.
deleteFile(string $filePath[, bool $assertable = true ][, bool $isReadable = true ][, bool $isWritable = true ]) : bool
This function optionally asserts that the file exists and meets
the specified readability and writability requirements before attempting deletion.
If the deletion fails, a FileException
is thrown.
Parameters
- $filePath : string
-
The path to the file to delete.
- $assertable : bool = true
-
Whether to perform assertions on the file before deletion (default: true).
- $isReadable : bool = true
-
Whether to assert that the file is readable (default: true).
- $isWritable : bool = true
-
Whether to assert that the file is writable (default: true).
Tags
Return values
bool —Returns true on successful deletion.