12 protected static $vault = null;
19 if (self::$vault === null) {
20 self::$vault = new \VaultFile(
"",
"FREEDOM");
32 self::getVault()->Show($idfile,
$info, $teng_name);
46 public static function storeFile($filepath, $ftitle =
"", $public_access =
false)
49 $err = self::getVault()->store($filepath, $public_access, $vid);
53 if ($ftitle !=
"") self::getVault()->rename($vid, $ftitle);
73 if ($ftitle !=
"") self::getVault()->rename($vid, $ftitle);
82 if (count($vids) > 0) {
83 $sql = sprintf(
"update vaultdiskstorage set id_tmp = null where id_tmp is not null and id_file in (%s)", implode(
",", array_map(
function ($x)
99 $info = self::getFileInfo($vid);
100 if (
$info === null) {
104 self::getVault()->destroy($vid);
112 $sql = sprintf(
"select id_file from vaultdiskstorage where id_tmp is not null and id_tmp != '' and cdate < (now() - INTERVAL '%d day');", $dayInterval);
115 foreach ($result as $vid) {
116 self::destroyFile($vid);
125 self::getVault()->updateAccessDate($idfile);
Exception class use exceptionCode to identifiy correctly exception.
static destroyTmpFiles($dayInterval=2)
static storeTemporaryFile($filepath, $ftitle="")
static updateAccessDate($idfile)
static getFileInfo($idfile, $teng_name="")
simpleQuery($dbaccess, $query, &$result=array(), $singlecolumn=false, $singleresult=false, $useStrict=null)
if($file) if($subject==""&&$file) if($subject=="") $err
static storeFile($filepath, $ftitle="", $public_access=false)
static setFilesPersitent(array $vids)