/** * @return bool */ public function disconnect() { if ($this->storage === NULL) { return FALSE; } if (!$this->keep_connected) { $this->storage->close(); $this->storage = NULL; } return TRUE; }
/** * Change file $mtime and $atime. * Create if not exists. * @param strting $filename * @param string $mtime * @param string $atime * @return boolean */ public function touch($filename, $mtime, $atime) { $fileType = $this->getFileType($filename); if ($fileType === FALSE) { if (!$this->createFile($filename)) { trigger_error("Cannot create file '{$filename}'", E_USER_WARNING); return FALSE; } } return $this->storage->setFileProperties($filename, ['mtime' => $mtime, 'atime' => $atime]); }