/** * @return IKey */ public function key($sPath, $bAutoCreate = false) { $sKeyPath = self::transPath($sPath, false); $sFlyweightKey = $this->aRootFolder->path() . '/' . $sKeyPath; if (!($aKey = FsKey::flyweight($sFlyweightKey, false))) { if (!($aFolder = $this->aRootFolder->findFolder($sKeyPath, $bAutoCreate ? Folder::FIND_AUTO_CREATE : 0))) { return null; } $aKey = new FsKey($aFolder); FsKey::setFlyweight($aKey, $sFlyweightKey); } return $aKey; }
public function deleteKey() { $this->arrItems = array(); if ($aFolder = $this->folder()) { FsKey::setFlyweight(null, $aFolder->path()); $aFolder->delete(true, true); $this->bDataChanged = false; } }