Lines Matching refs:path
100 int32_t PkgManagerImpl::CreatePackage(const std::string &path, const std::string &keyName, PkgInfoPtr header,
113 PkgFilePtr pkgFile = CreatePackage<ZipFileInfo>(path, header, files, offset);
122 int32_t PkgManagerImpl::CreatePackage(const std::string &path, const std::string &keyName, PkgInfoPtr header,
135 PkgFilePtr pkgFile = CreatePackage<ComponentInfo>(path, header, files, offset);
145 int32_t PkgManagerImpl::CreatePackage(const std::string &path, const std::string &keyName, PkgInfoPtr header,
158 PkgFilePtr pkgFile = CreatePackage<Lz4FileInfo>(path, header, files, offset);
169 PkgFilePtr PkgManagerImpl::CreatePackage(const std::string &path, PkgInfoPtr header,
173 int32_t ret = CreatePkgStream(stream, path, 0, PkgStream::PkgStreamType_Write);
175 PKG_LOGE("CreatePackage fail %s", path.c_str());
182 PKG_LOGE("CreatePackage fail %s", path.c_str());
332 const std::string PkgManagerImpl::GetExtraPath(const std::string &path)
334 if (path.find(Updater::SDCARD_CARD_PATH) != string::npos) {
335 return path;
336 } else if (path == UPDATRE_SCRIPT_ZIP) {
343 int32_t PkgManagerImpl::ExtraAndLoadPackage(const std::string &path, const std::string &name,
355 const std::string tempPath = GetExtraPath(path);
379 return LoadPackageWithStream(path, fileIds, type, stream);
434 int32_t PkgManagerImpl::ExtractFile(const std::string &path, PkgManager::StreamPtr output)
442 PkgEntryPtr pkgEntry = GetPkgEntry(path);
446 PKG_LOGE("Can not find file %s", path.c_str());
474 const FileInfo *PkgManagerImpl::GetFileInfo(const std::string &path)
476 PkgEntryPtr pkgEntry = GetPkgEntry(path);
483 PkgEntryPtr PkgManagerImpl::GetPkgEntry(const std::string &path)
488 PkgEntryPtr pkgEntry = pkgFile->FindPkgEntry(path);
644 std::string PkgManagerImpl::GetPkgName(const std::string &path)
646 std::size_t pos = path.find_last_of('.');
650 std::string pkgName = path.substr(pos + 1, -1);
655 std::size_t secPos = path.find_last_of('.', pos - 1);
659 std::string secPkgName = path.substr(secPos + 1, pos - secPos - 1);
664 PkgFile::PkgType PkgManagerImpl::GetPkgTypeByName(const std::string &path)
666 std::size_t pos = path.find_last_of('.');
670 std::string postfix = path.substr(pos + 1, -1);
673 if (path.compare("update.bin") == 0) {
675 } else if (path.substr(pos + 1, -1).compare("zip") == 0) {
677 } else if (path.substr(pos + 1, -1).compare("lz4") == 0) {
679 } else if (path.substr(pos + 1, -1).compare("gz") == 0) {