You are here

function file_delete in Drupal 6

Same name and namespace in other branches
  1. 8 core/includes/file.inc \file_delete()
  2. 4 includes/file.inc \file_delete()
  3. 5 includes/file.inc \file_delete()
  4. 7 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 includes/file.inc
Moves a file to a new location.
locale_uninstall in modules/locale/locale.install
Implementation of hook_uninstall().
system_cron in modules/system/system.module
Implementation of hook_cron().
upload_delete in modules/upload/upload.module
upload_delete_revision in modules/upload/upload.module

... See full list

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

File

includes/file.inc, line 544
API for handling file uploads and server file management.

Code

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