function file_delete

Same name and namespace in other branches
  1. 7.x drupal-7.x/includes/file.inc \file_delete()

Delete a file.

Parameters

$path A string containing a file path.:

Return value

TRUE for success, FALSE for failure.

Related topics

9 calls to file_delete()
file_move in drupal-6.x/includes/file.inc
Moves a file to a new location.
locale_uninstall in drupal-6.x/modules/locale/locale.install
Implementation of hook_uninstall().
system_cron in drupal-6.x/modules/system/system.module
Implementation of hook_cron().
upload_delete in drupal-6.x/modules/upload/upload.module
upload_delete_revision in drupal-6.x/modules/upload/upload.module

... See full list

2 string references to 'file_delete'
drupal_clear_css_cache in drupal-6.x/includes/common.inc
Delete all cached CSS files.
drupal_clear_js_cache in drupal-6.x/includes/common.inc
Delete all cached JS files.

Archivo

drupal-6.x/includes/file.inc, line 544
API for handling file uploads and server file management.

Código

function file_delete($path) {
  if (is_file($path)) {
    return unlink($path);
  }
}