You are here

function file_delete in Drupal 5

Same name and namespace in other branches
  1. 8 core/includes/file.inc \file_delete()
  2. 4 includes/file.inc \file_delete()
  3. 6 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

7 calls to file_delete()
file_move in includes/file.inc
Moves a file to a new location.
upload_delete in modules/upload/upload.module
upload_delete_revision in modules/upload/upload.module
upload_save in modules/upload/upload.module
_upload_prepare in modules/upload/upload.module
Save new uploads and attach them to the node object. append file_previews to the node object as well.

... See full list

1 string reference to 'file_delete'
drupal_clear_css_cache in includes/common.inc
Delete all cached CSS files.

File

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

Code

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