コード例 #1
0
ファイル: homecache.php プロジェクト: evanjt/core
 protected function setUp()
 {
     parent::setUp();
     $this->user = new DummyUser('foo', \OC_Helper::tmpFolder());
     $this->storage = new \OC\Files\Storage\Home(array('user' => $this->user));
     $this->cache = $this->storage->getCache();
 }
コード例 #2
0
 protected function setUp()
 {
     parent::setUp();
     $this->user = new DummyUser('foo', \OC::$server->getTempManager()->getTemporaryFolder());
     $this->storage = new \OC\Files\Storage\Home(array('user' => $this->user));
     $this->cache = $this->storage->getCache();
 }
コード例 #3
0
ファイル: Usage.php プロジェクト: arnovr/owncloud-statistics
 /**
  * @param string $userName
  * @return integer
  */
 public function byUsername($userName)
 {
     $data = new Home(array('user' => \OC_User::getManager()->get($userName)));
     return KiloBytes::allocateUnits($data->getCache('files')->calculateFolderSize('files'))->units();
 }