You are here

function _boost_write_file_chmod in Boost 6

Create the dir, write the file, chmod the file.

Parameters

$filename: Path and filename to be created

$data: data inside the file

4 calls to _boost_write_file_chmod()
boost_cache_css_js_files in ./boost.module
Cache css and or js files.
boost_cache_delete in ./boost.module
Deletes files in the cache.
_boost_generate_gzip_test_file in ./boost.module
Generate iframe gzip cookie test html file.
_boost_gz_copy_file in ./boost.module
Copy a file and gzip its contents

File

./boost.module, line 5425
Provides static file caching for Drupal text output. Pages, Feeds, ect...

Code

function _boost_write_file_chmod($filename, $data) {
  if (_boost_mkdir_p(dirname($filename))) {
    $bytes = @file_put_contents($filename, $data);
    if ($bytes && is_numeric(BOOST_PERMISSIONS_FILE)) {
      @chmod($filename, octdec(BOOST_PERMISSIONS_FILE));
    }
    return $bytes;
  }
  else {
    return FALSE;
  }
}