• Home
  • Raw
  • Download

Lines Matching refs:path

44                      const std::string& path,  in ApkAssets()  argument
46 : zip_handle_(unmanaged_handle, ::CloseArchive), path_(path), last_mod_time_(last_mod_time) { in ApkAssets()
49 std::unique_ptr<const ApkAssets> ApkAssets::Load(const std::string& path, bool system) { in Load() argument
50 return LoadImpl({} /*fd*/, path, nullptr, nullptr, system, false /*load_as_shared_library*/); in Load()
53 std::unique_ptr<const ApkAssets> ApkAssets::LoadAsSharedLibrary(const std::string& path, in LoadAsSharedLibrary() argument
55 return LoadImpl({} /*fd*/, path, nullptr, nullptr, system, true /*load_as_shared_library*/); in LoadAsSharedLibrary()
84 std::unique_ptr<Asset> ApkAssets::CreateAssetFromFile(const std::string& path) { in CreateAssetFromFile() argument
85 unique_fd fd(base::utf8::open(path.c_str(), O_RDONLY | O_BINARY | O_CLOEXEC)); in CreateAssetFromFile()
87 LOG(ERROR) << "Failed to open file '" << path << "': " << SystemErrorCodeToString(errno); in CreateAssetFromFile()
93 LOG(ERROR) << "Failed to get size of file '" << path << "': " << SystemErrorCodeToString(errno); in CreateAssetFromFile()
98 if (!file_map->create(path.c_str(), fd, 0, static_cast<size_t>(file_len), true /*readOnly*/)) { in CreateAssetFromFile()
99 LOG(ERROR) << "Failed to mmap file '" << path << "': " << SystemErrorCodeToString(errno); in CreateAssetFromFile()
106 unique_fd fd, const std::string& path, std::unique_ptr<Asset> idmap_asset, in LoadImpl() argument
112 ::OpenArchiveFd(fd.release(), path.c_str(), &unmanaged_handle, true /*assume_ownership*/); in LoadImpl()
114 result = ::OpenArchive(path.c_str(), &unmanaged_handle); in LoadImpl()
118 LOG(ERROR) << "Failed to open APK '" << path << "' " << ::ErrorCodeString(result); in LoadImpl()
122 time_t last_mod_time = getFileModDate(path.c_str()); in LoadImpl()
125 std::unique_ptr<ApkAssets> loaded_apk(new ApkAssets(unmanaged_handle, path, last_mod_time)); in LoadImpl()
138 LOG(WARNING) << kResourcesArsc << " in APK '" << path << "' is compressed."; in LoadImpl()
144 LOG(ERROR) << "Failed to open '" << kResourcesArsc << "' in APK '" << path << "'."; in LoadImpl()
157 LOG(ERROR) << "Failed to load '" << kResourcesArsc << "' in APK '" << path << "'."; in LoadImpl()
165 std::unique_ptr<Asset> ApkAssets::Open(const std::string& path, Asset::AccessMode mode) const { in Open() argument
168 ::ZipString name(path.c_str()); in Open()
179 LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << path_ << "'"; in Open()
186 LOG(ERROR) << "Failed to decompress '" << path << "'."; in Open()
194 LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << path_ << "'"; in Open()
200 LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << path_ << "'"; in Open()