Esempio n. 1
0
/**
 * Tests for file writability
 *
 * is_writable() returns TRUE on Windows servers when you really can't write to
 * the file, based on the read-only attribute.  is_writable() is also unreliable
 * on Unix servers if safe_mode is on.
 *
 * @deprecated 3.0.0
 * @access	private
 * @return	void
 */
function is_really_writable($file)
{
    $fs = new Filesystem();
    return $fs->isWritable($file);
}
Esempio n. 2
0
 /**
  * If we group is deleted we need to remove the folder
  */
 public function onAfterDelete()
 {
     $fs = new Filesystem();
     $path = $this->getFolderPath();
     if (isset($path) && $fs->isDir($path)) {
         $fs->deleteDir($path);
     }
 }
Esempio n. 3
0
 /**
  * If the template is deleted, remove the template file
  */
 public function onAfterDelete()
 {
     $fs = new Filesystem();
     $path = $this->getFilePath();
     if (isset($path) && $fs->exists($path)) {
         $fs->delete($path);
     }
 }