Delete a file, and any compressed versions.

Paramètres

string $uri: URI of the file to delete.

Return value

string The given URI.

3 calls to advagg_delete_file_by_uri()
advagg_delete_files_if_empty dans ./advagg.cache.inc
Given an array of files remove that file if it is empty.
advagg_delete_files_if_orphaned dans ./advagg.cache.inc
Given an array of files remove that file if there is no associated db record.
advagg_delete_files_if_stale dans ./advagg.cache.inc
Given an array of files remove that file if atime is grater than 30 days.

Fichier

./advagg.cache.inc, line 348

Code

function advagg_delete_file_by_uri($uri) {
    if (file_exists($uri)) {
        file_unmanaged_delete($uri);
    }
    if (file_exists($uri . '.gz')) {
        file_unmanaged_delete($uri . '.gz');
    }
    if (file_exists($uri . '.br')) {
        file_unmanaged_delete($uri . '.br');
    }
    return $uri;
}