public function handle() { $userManager = \OC::$server->getUserManager(); if (!$userManager->userExists($this->user)) { // User has been deleted already return; } \OC_Util::setupFS($this->user); Storage::expire($this->fileName, $this->versionsSize, $this->neededSpace); \OC_Util::tearDownFS(); }
public function testExpireNonexistingFile() { $this->logout(); // needed to have a FS setup (the background job does this) \OC_Util::setupFS(self::TEST_VERSIONS_USER); $this->assertFalse(\OCA\Files_Versions\Storage::expire('/void/unexist.txt')); }
public function handle() { \OC_Util::setupFS($this->user); Storage::expire($this->fileName, $this->versionsSize, $this->neededSpace); \OC_Util::tearDownFS(); }