當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Manager::findIn方法代碼示例

本文整理匯總了PHP中OC\Files\Mount\Manager::findIn方法的典型用法代碼示例。如果您正苦於以下問題:PHP Manager::findIn方法的具體用法?PHP Manager::findIn怎麽用?PHP Manager::findIn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OC\Files\Mount\Manager的用法示例。


在下文中一共展示了Manager::findIn方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getMountPoints

	/**
	 * get a list of all mount points in a directory
	 *
	 * @param string $path
	 * @return string[]
	 */
	static public function getMountPoints($path) {
		if (!self::$mounts) {
			\OC_Util::setupFS();
		}
		$result = array();
		$mounts = self::$mounts->findIn($path);
		foreach ($mounts as $mount) {
			$result[] = $mount->getMountPoint();
		}
		return $result;
	}
開發者ID:pombredanne,項目名稱:ArcherSys,代碼行數:17,代碼來源:filesystem.php

示例2: testFind

 public function testFind()
 {
     $this->assertNull($this->manager->find('/'));
     $rootMount = new \OC\Files\Mount\MountPoint(new Temporary(array()), '/');
     $this->manager->addMount($rootMount);
     $this->assertEquals($rootMount, $this->manager->find('/'));
     $this->assertEquals($rootMount, $this->manager->find('/foo/bar'));
     $storage = new Temporary(array());
     $mount1 = new \OC\Files\Mount\MountPoint($storage, '/foo');
     $this->manager->addMount($mount1);
     $this->assertEquals($rootMount, $this->manager->find('/'));
     $this->assertEquals($mount1, $this->manager->find('/foo/bar'));
     $this->assertEquals(1, count($this->manager->findIn('/')));
     $mount2 = new \OC\Files\Mount\MountPoint(new Temporary(array()), '/bar');
     $this->manager->addMount($mount2);
     $this->assertEquals(2, count($this->manager->findIn('/')));
     $id = $mount1->getStorageId();
     $this->assertEquals(array($mount1), $this->manager->findByStorageId($id));
     $mount3 = new \OC\Files\Mount\MountPoint($storage, '/foo/bar');
     $this->manager->addMount($mount3);
     $this->assertEquals(array($mount1, $mount3), $this->manager->findByStorageId($id));
 }
開發者ID:evanjt,項目名稱:core,代碼行數:22,代碼來源:manager.php

示例3: getMountsIn

 /**
  * @param string $mountPoint
  * @return \OC\Files\Mount\MountPoint[]
  */
 public function getMountsIn($mountPoint)
 {
     return $this->mountManager->findIn($mountPoint);
 }
開發者ID:adolfo2103,項目名稱:hcloudfilem,代碼行數:8,代碼來源:root.php


注:本文中的OC\Files\Mount\Manager::findIn方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。