14 self::deleteTree(SABRE_TEMPDIR,
false);
21 foreach (scandir(
$path) as $node) {
23 if ($node ==
'.' || $node ==
'..')
continue;
24 $myPath =
$path .
'/' . $node;
25 if (is_file($myPath)) {
28 self::deleteTree($myPath);
41 $pdo = new \PDO(SABRE_MYSQLDSN, SABRE_MYSQLUSER, SABRE_MYSQLPASS);
42 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
52 $pdo = new \PDO(
'sqlite:' . SABRE_TEMPDIR .
'/pdobackend');
53 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
61 $pdo = new \PDO(SABRE_PGSQLDSN);
62 $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
static deleteTree($path, $deleteRoot=true)
static clearTempDir()
This function deletes all the contents of the temporary directory.