W3cubDocs

/Drupal 8

function file_unmunge_filename

file_unmunge_filename($filename)

Undoes the effect of file_munge_filename().

Parameters

$filename: String with the filename to be unmunged.

Return value

An unmunged filename string.

Related topics

File interface
Common file handling functions.

File

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

Code

function file_unmunge_filename($filename) {
  return str_replace('_.', '.', $filename);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!file.inc/function/file_unmunge_filename/8.1.x