Example #1
0
 /**
  * Write a file to the disk.
  * This function is heavily based on the way smarty process its own files.
  * Is using a temporary file and then rename the file. We guess the file system will be smarter than us, avoiding a writing / reading
  *  while renaming the file.
  * This method comes from CopixFile class of Copix framework
  * @author     GĂ©rald Croes
  * @copyright  2001-2005 CopixTeam
  * @link http://www.copix.org
  */
 public static function write($file, $data, $chmod = null)
 {
     if (!$chmod && jApp::config()) {
         $chmod = jApp::config()->chmodFile;
     }
     return File::write($file, $data, $chmod);
 }