file_delete

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 file_delete($path)
drupal7 file_delete($file, $force = FALSE)

Delete a file.

Übergabeparameter

$path A string containing a file path.

Rückgabewert

TRUE for success, FALSE for failure.

Verwandte Themen

▾ 9 functions call 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
upload_save in modules/upload/upload.module
user_validate_picture in modules/user/user.module
_locale_rebuild_js in includes/locale.inc
(Re-)Creates the JavaScript translation file for a language.
_user_edit_submit in modules/user/user.module

Code

includes/file.inc, line 469

<?php
function file_delete($path) {
  if (is_file($path)) {
    return unlink($path);
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen