• Home
  • Raw
  • Download

Lines Matching full:file

4  * you may not use this file except in compliance with the License.
54 class File {
184 Span file(GetBase(), header->file_size); in GetSpanFromId()
185 ThrowIfWithCheck(!id.IsValid() || id.GetOffset() >= file.size(), File::INVALID_FILE_OFFSET, in GetSpanFromId()
186 File::GET_SPAN_FROM_ID); in GetSpanFromId()
187 return file.Last(file.size() - id.GetOffset()); in GetSpanFromId()
193 Span file(GetBase(), header->file_size); in GetClasses()
194 … Span class_idx_data = file.SubSpan(header->class_idx_off, header->num_classes * sizeof(uint32_t)); in GetClasses()
201 Span file(GetBase(), header->file_size); in GetLiteralArrays()
202 …Span litarr_idx_data = file.SubSpan(header->literalarray_idx_off, header->num_literalarrays * size… in GetLiteralArrays()
209 Span file(GetBase(), header->file_size); in GetIndexHeaders()
210 … auto sp = file.SubSpan(header->index_section_off, header->num_indexes * sizeof(IndexHeader)); in GetIndexHeaders()
231 ThrowIfWithCheck(index_header == nullptr, File::NULL_INDEX_HEADER, File::GET_CLASS_INDEX); in GetClassIndex()
233 Span file(GetBase(), header->file_size); in GetClassIndex()
237 … index_header->class_idx_off > header->file_size - class_idx_size, File::INVALID_INDEX_HEADER, in GetClassIndex()
238 File::GET_CLASS_INDEX); in GetClassIndex()
239 …auto sp = file.SubSpan(index_header->class_idx_off, index_header->class_idx_size * EntityId::GetSi… in GetClassIndex()
251 ThrowIfWithCheck(index_header == nullptr, File::NULL_INDEX_HEADER, File::GET_METHOD_INDEX); in GetMethodIndex()
253 Span file(GetBase(), header->file_size); in GetMethodIndex()
257 … index_header->method_idx_off > header->file_size - method_idx_size, File::INVALID_INDEX_HEADER, in GetMethodIndex()
258 File::GET_METHOD_INDEX); in GetMethodIndex()
259 …auto sp = file.SubSpan(index_header->method_idx_off, index_header->method_idx_size * EntityId::Get… in GetMethodIndex()
271 ThrowIfWithCheck(index_header == nullptr, File::NULL_INDEX_HEADER, File::GET_FIELD_INDEX); in GetFieldIndex()
273 Span file(GetBase(), header->file_size); in GetFieldIndex()
277 … index_header->field_idx_off > header->file_size - field_idx_size, File::INVALID_INDEX_HEADER, in GetFieldIndex()
278 File::GET_FIELD_INDEX); in GetFieldIndex()
279 …auto sp = file.SubSpan(index_header->field_idx_off, index_header->field_idx_size * EntityId::GetSi… in GetFieldIndex()
291 ThrowIfWithCheck(index_header == nullptr, File::NULL_INDEX_HEADER, File::GET_PROTO_INDEX); in GetProtoIndex()
293 Span file(GetBase(), header->file_size); in GetProtoIndex()
297 … index_header->proto_idx_off > header->file_size - proto_idx_size, File::INVALID_INDEX_HEADER, in GetProtoIndex()
298 File::GET_PROTO_INDEX); in GetProtoIndex()
299 …auto sp = file.SubSpan(index_header->proto_idx_off, index_header->proto_idx_size * EntityId::GetSi… in GetProtoIndex()
312 Span file(GetBase(), header->file_size); in GetLineNumberProgramIndex()
313 … Span lnp_idx_data = file.SubSpan(header->lnp_idx_off, header->num_lnps * EntityId::GetSize()); in GetLineNumberProgramIndex()
409 return MEMBER_OFFSET(File, base_); in GetFileBaseOffset()
419 …static std::unique_ptr<const File> Open(std::string_view filename, OpenMode open_mode = READ_ONLY);
421 static std::unique_ptr<const File> OpenFromMemory(os::mem::ConstBytePtr &&ptr);
423 …static std::unique_ptr<const File> OpenFromMemory(os::mem::ConstBytePtr &&ptr, std::string_view fi…
425 …static std::unique_ptr<const File> OpenUncompressedArchive(int fd, const std::string_view &filenam…
437 static constexpr const char *INVALID_FILE_OFFSET = "Invalid file offset";
452 ~File();
454 NO_COPY_SEMANTIC(File);
455 NO_MOVE_SEMANTIC(File);
458 File(std::string filename, os::mem::ConstBytePtr &&base);
471 static_assert(File::GetFileBaseOffset() == 0);
473 inline bool operator==(const File::StringData &string_data1, const File::StringData &string_data2)
482 inline bool operator!=(const File::StringData &string_data1, const File::StringData &string_data2)
487 inline bool operator<(const File::StringData &string_data1, const File::StringData &string_data2)
501 std::unique_ptr<const File> OpenPandaFileOrZip(std::string_view location,
502 … panda_file::File::OpenMode open_mode = panda_file::File::READ_ONLY);
505 * OpenPandaFileFromMemory from file buffer.
507 std::unique_ptr<const File> OpenPandaFileFromMemory(const void *buffer, size_t size, std::string ta…
512 std::unique_ptr<const File> OpenPandaFileFromSecureMemory(uint8_t *buffer, size_t size);
517 std::unique_ptr<const File> OpenPandaFile(std::string_view location, std::string_view archive_filen…
518 … panda_file::File::OpenMode open_mode = panda_file::File::READ_ONLY);
521 * Check ptr point valid panda file: magic
524 void CheckFileVersion(const std::array<uint8_t, File::VERSION_SIZE> &file_version, const std::strin…
532 struct hash<panda::panda_file::File::EntityId> {
533 std::size_t operator()(panda::panda_file::File::EntityId id) const