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()
87 std::unique_ptr<Asset> ApkAssets::CreateAssetFromFile(const std::string& path) { in CreateAssetFromFile() argument
88 unique_fd fd(base::utf8::open(path.c_str(), O_RDONLY | O_BINARY | O_CLOEXEC)); in CreateAssetFromFile()
90 LOG(ERROR) << "Failed to open file '" << path << "': " << SystemErrorCodeToString(errno); in CreateAssetFromFile()
96 LOG(ERROR) << "Failed to get size of file '" << path << "': " << SystemErrorCodeToString(errno); in CreateAssetFromFile()
101 if (!file_map->create(path.c_str(), fd, 0, static_cast<size_t>(file_len), true /*readOnly*/)) { in CreateAssetFromFile()
102 LOG(ERROR) << "Failed to mmap file '" << path << "': " << SystemErrorCodeToString(errno); in CreateAssetFromFile()
109 unique_fd fd, const std::string& path, std::unique_ptr<Asset> idmap_asset, in LoadImpl() argument
115 ::OpenArchiveFd(fd.release(), path.c_str(), &unmanaged_handle, true /*assume_ownership*/); in LoadImpl()
117 result = ::OpenArchive(path.c_str(), &unmanaged_handle); in LoadImpl()
121 LOG(ERROR) << "Failed to open APK '" << path << "' " << ::ErrorCodeString(result); in LoadImpl()
125 time_t last_mod_time = getFileModDate(path.c_str()); in LoadImpl()
128 std::unique_ptr<ApkAssets> loaded_apk(new ApkAssets(unmanaged_handle, path, last_mod_time)); in LoadImpl()
140 LOG(WARNING) << kResourcesArsc << " in APK '" << path << "' is compressed."; in LoadImpl()
146 LOG(ERROR) << "Failed to open '" << kResourcesArsc << "' in APK '" << path << "'."; in LoadImpl()
159 LOG(ERROR) << "Failed to load '" << kResourcesArsc << "' in APK '" << path << "'."; in LoadImpl()
167 std::unique_ptr<Asset> ApkAssets::Open(const std::string& path, Asset::AccessMode mode) const { in Open() argument
171 int32_t result = ::FindEntry(zip_handle_.get(), path, &entry); in Open()
180 LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << path_ << "'"; in Open()
187 LOG(ERROR) << "Failed to decompress '" << path << "'."; in Open()
195 LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << path_ << "'"; in Open()
201 LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << path_ << "'"; in Open()