You are here

function cpn_delete_file in Code per Node 6

Same name and namespace in other branches
  1. 7 cpn.module \cpn_delete_file()

Deletes CSS & JavaScript from the file system (but only if it exists).

4 calls to cpn_delete_file()
cpn_block_submit in ./cpn.module
Block submit callback.
cpn_nodeapi in ./cpn.module
Implementation of hook_nodeapi().
cpn_node_type_submit in ./cpn.module
Node type submit callback.
cpn_settings_submit in ./cpn.admin.inc
FormAPI submit callback for the CPN form.

File

./cpn.module, line 444
Primary hook implementations.

Code

function cpn_delete_file($filename) {
  $path = file_create_path(variable_get('cpn_path', 'cpn') . '/' . $filename);
  if (file_exists($path)) {
    return file_delete($path);
  }
  return FALSE;
}