function OOoMime($dir, $type) { $file = new File($dir . "/mimetype"); if (!$file->exists()) { $file->writeData("application/vnd.sun.xml." . $type); } }
/** * absOOo::save(), sauvegarde le fichier xml courant * * @return none * @access private **/ function save() { $XMLContent = $this->toString(); $xmlFile = new File($this->DIRXML . "/" . $this->FILENAME, TRUE); if ($xmlFile->exists()) { $xmlFile->delFile(); $xmlFile->createFile(); } $xmlFile->writeData($XMLContent); }
function createFile($file, $data) { $file = new File($file, TRUE); if ($file->exists()) { $file->delFile(); $file->createFile(); } $file->writeData($data); }