Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 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'));
 }
Ejemplo n.º 3
0
 public function handle()
 {
     \OC_Util::setupFS($this->user);
     Storage::expire($this->fileName, $this->versionsSize, $this->neededSpace);
     \OC_Util::tearDownFS();
 }