Home
last modified time | relevance | path

Searched refs:entry (Results 1 - 25 of 65) sorted by relevance

123

/developtools/packing_tool/adapter/ohos/
H A DCommandParser.java111 commandFuncs.put(CMD_MODE, entry -> { in initCommandFuncs()
112 entry.getKey().setMode(entry.getValue()); in initCommandFuncs()
115 commandFuncs.put(CMD_JSON_PATH, entry -> { in initCommandFuncs()
116 entry.getKey().setJsonPath(entry.getValue()); in initCommandFuncs()
119 commandFuncs.put(CMD_PROFILE_PATH, entry -> { in initCommandFuncs()
120 entry.getKey().setProfilePath(entry.getValue()); in initCommandFuncs()
123 commandFuncs.put(CMD_INDEX_PATH, entry in initCommandFuncs()
[all...]
H A DFileUtils.java217 ZipEntry entry = entries.nextElement(); in unzip()
218 if (entry == null) { in unzip()
221 String filePath = destDir + File.separator + entry.getName(); in unzip()
226 if (entry.isDirectory()) { in unzip()
231 bis = new BufferedInputStream(zipFile.getInputStream(entry)); in unzip()
395 ZipEntry entry = null; in getJsonInZips()
401 while ((entry = zin.getNextEntry()) != null) { in getJsonInZips()
402 if (entry.getName().toLowerCase().equals(jsonName)) { in getJsonInZips()
403 inputStream = zipFile.getInputStream(entry); in getJsonInZips()
439 final ZipEntry entry in getProfileJson()
[all...]
H A DUncompress.java61 private static final String ENTRY_TYPE = "entry";
212 ZipEntry entry = null; in uncompressHapAndHspFromAppPath()
218 entry = entries.nextElement(); in uncompressHapAndHspFromAppPath()
219 stream = appFile.getInputStream(entry); in uncompressHapAndHspFromAppPath()
220 if (!hapName.equals(entry.getName().toLowerCase(Locale.ENGLISH))) { in uncompressHapAndHspFromAppPath()
225 hapInfo.getProfileInfos().get(0).hapInfo.originalSize = entry.getSize(); in uncompressHapAndHspFromAppPath()
226 hapInfo.getProfileInfos().get(0).hapInfo.compressedSize = entry.getCompressedSize(); in uncompressHapAndHspFromAppPath()
245 ZipEntry entry = null; in uncompressAllAppByPath()
251 entry = entries.nextElement(); in uncompressAllAppByPath()
252 stream = appFile.getInputStream(entry); in uncompressAllAppByPath()
603 dataTransfer(ZipFile zipFile, ZipEntry entry, File destFile) dataTransfer() argument
[all...]
/developtools/hdc/hdc_rust/src/tar/
H A Dcompress.rs23 use crate::tar::entry::Entry;
65 for entry in fs::read_dir(path)? { in add_path_recursion()
66 let entry = entry?; in add_path_recursion()
67 let entry_path = entry.path(); in add_path_recursion()
97 let entry = Entry::new(self.prefix.clone(), file); in add_entry()
98 self.entrys.push(entry); in add_entry()
118 for entry in &mut self.entrys { in compress()
119 entry.read_data_to_file(&mut f)?; in compress()
H A Ddecompress.rs23 use crate::tar::{entry::Entry, header};
53 let mut entry = None; in file() variables
56 512 => match entry { in file()
62 entry = Some(p_entry); in file()
70 decompress.entrys.push(entry.unwrap()); in file()
71 entry = None; in file()
104 for entry in &self.entrys { in decompress()
105 if !entry.is_finish() { in decompress()
109 if let Err(e) = entry.write_to_file(prefix_path) { in decompress()
110 crate::error!("entry in decompress()
[all...]
H A Dentry.rs15 //! entry
41 /// new entry form file
43 let mut entry = Self { in new() variables
53 entry.header.updata_size(file_size as usize); in new()
54 entry.need_size = file_size; in new()
55 entry.header.updata_file_type(TypeFlage::OrdinaryFile); in new()
57 entry.header.updata_size(0); in new()
58 entry.header.updata_file_type(TypeFlage::Directory); in new()
61 Err(_) => return entry, in new()
64 if let Err(e) = entry in new()
[all...]
/developtools/profiler/tools/pagemap_parse/
H A Dpagemap_parse.cpp104 void ParsePagemap(uint64_t entry, PageInfo & pginfo) in ParsePagemap() argument
106 pginfo.inRam = (entry >> IN_RAM_OFFSET) & 0x1; in ParsePagemap()
107 pginfo.inSwap = (entry >> IN_SWAP_OFFSET) & 0x1; in ParsePagemap()
108 pginfo.shared = (entry >> SHARED_OFFSET) & 0x1; in ParsePagemap()
109 pginfo.exclusive = (entry >> EXCLUSIVE_OFFSET) & 0x1; in ParsePagemap()
110 pginfo.softdirty = (entry >> SOFTDIRTY_OFFSET) & 0x1; in ParsePagemap()
111 pginfo.pfn = entry & PFN_MASK; in ParsePagemap()
177 uint64_t entry; in main() local
178 if (pread(pagemapFd, &entry, sizeof(entry), offse in main()
[all...]
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/zip/
H A DZipEntryData.java67 * init zip entry by file
70 * @param entryOffset entry start offset
72 * @return zip entry
79 // read entry header by file and offset. in getZipEntry()
84 // read entry file name and extra by offset. in getZipEntry()
98 ZipEntryData entry = new ZipEntryData(); in getZipEntry()
99 entry.setFileOffset(offset); in getZipEntry()
100 entry.setFileSize(fileSize); in getZipEntry()
104 entry.setType(EntryType.RUNNABLE_FILE); in getZipEntry()
106 entry in getZipEntry()
[all...]
H A DZip.java88 // 3. use cd's entry offset and file size, get entry data in Zip()
96 // 4. file all data - eocd - cd - entry = sign block in Zip()
144 ZipEntry entry = new ZipEntry(); in getZipCentralDirectory()
145 entry.setCentralDirectory(cd); in getZipCentralDirectory()
146 zipEntries.add(entry); in getZipCentralDirectory()
157 throw new ZipException("signing offset in front of entry end"); in getSigningBlock()
166 // use central directory data, find entry data in getZipEntries()
167 for (ZipEntry entry : zipEntries) { in getZipEntries()
168 CentralDirectory cd = entry in getZipEntries()
[all...]
H A DZipEntry.java43 * alignment one entry
50 // if cd extra len bigger than entry extra len, make cd and entry extra length equals in alignment()
130 * zip entry builder
197 * build zip entry
211 throw new ZipException("can not find entry data"); in build()
222 ZipEntry entry = new ZipEntry(); in build()
223 entry.setZipEntryData(entryData); in build()
225 entry.setCentralDirectory(cd); in build()
226 return entry; in build()
[all...]
/developtools/hapsigner/hapsigntool_cpp/zip/src/
H A Dzip_signer.cpp46 /* 3. use cd's entry offset and file size, get entry data */ in Init()
57 /* 4. file all data - eocd - cd - entry = sign block */ in Init()
145 ZipEntry* entry = new ZipEntry(); in GetZipCentralDirectory() local
146 entry->SetCentralDirectory(cd); in GetZipCentralDirectory()
147 m_zipEntries.emplace_back(entry); in GetZipCentralDirectory()
162 SIGNATURE_TOOLS_LOGE("signing offset in front of entry end"); in GetSigningBlock()
180 /* use central directory data, find entry data */ in GetZipEntries()
181 for (auto& entry : m_zipEntries) { in GetZipEntries()
182 CentralDirectory* cd = entry in GetZipEntries()
[all...]
H A Dzip_entry_data.cpp33 /* read entry header by file and offset. */ in GetZipEntry()
36 SIGNATURE_TOOLS_LOGE("read zip entry head failed in file"); in GetZipEntry()
45 /* read entry file name and extra by offset. */ in GetZipEntry()
50 ZipEntryData* entry = new ZipEntryData(); in GetZipEntry() local
51 entry->SetFileOffset(offset); in GetZipEntry()
52 entry->SetFileSize(fileSize); in GetZipEntry()
58 /* if entry has data descriptor, read entry data descriptor. */ in GetZipEntry()
61 SIGNATURE_TOOLS_LOGE("read entry data descriptor failed in file"); in GetZipEntry()
69 entry in GetZipEntry()
[all...]
/developtools/hdc/hdc_rust/src/cffi/
H A Dusb_util.cpp37 struct dirent *entry = nullptr; in GetDevPath() local
38 while ((entry = ::readdir(dir))) { in GetDevPath()
39 if (*entry->d_name == '.') { in GetDevPath()
42 node = entry->d_name; in GetDevPath()
/developtools/global_resource_tool/src/
H A Dresource_append.cpp81 FileEntry entry(folderPath); in Combine()
82 if (!entry.Init()) { in Combine()
87 for (const auto &child : entry.GetChilds()) { in Combine()
128 FileEntry entry(resourcePath); in ScanResources()
129 if (!entry.Init()) { in ScanResources()
133 if (entry.IsFile()) { in ScanResources()
137 return ScanSubResources(entry, resourcePath, outputPath); in ScanResources()
140 bool ResourceAppend::ScanSubResources(const FileEntry entry, const string &resourcePath, const string &outputPath) in ScanSubResources() argument
143 if (KeyParser::Parse(entry.GetFilePath().GetFilename(), keyParams)) { in ScanSubResources()
144 for (const auto &child : entry in ScanSubResources()
162 ScanSubLimitkeyResources(const FileEntry entry, const string &resourcePath, const string &outputPath) ScanSubLimitkeyResources() argument
203 ScanLimitKey(const unique_ptr<FileEntry> &entry, const string &limitKey, const string outputPath) ScanLimitKey() argument
239 ScanFiles(const unique_ptr<FileEntry> &entry, const DirectoryInfo &directoryInfo, const string &outputPath) ScanFiles() argument
[all...]
H A Dbinary_file_packer.cpp105 for (const auto &entry : f.GetChilds()) { in CopyBinaryFileImpl()
106 string filename = entry->GetFilePath().GetFilename(); in CopyBinaryFileImpl()
107 if (ResourceUtil::IsIgnoreFile(filename, entry->IsFile())) { in CopyBinaryFileImpl()
112 if (!entry->IsFile()) { in CopyBinaryFileImpl()
113 if (CopyBinaryFileImpl(entry->GetFilePath().GetPath(), subPath) != RESTOOL_SUCCESS) { in CopyBinaryFileImpl()
120 cerr << "Warning: '" << entry->GetFilePath().GetPath() << "' is defined repeatedly." << endl; in CopyBinaryFileImpl()
127 string path = entry->GetFilePath().GetPath(); in CopyBinaryFileImpl()
H A Dfile_entry.cpp86 struct dirent *entry; in GetChilds() local
87 while ((entry = readdir(handle)) != nullptr) { in GetChilds()
88 string filename(entry->d_name); in GetChilds()
296 bool FileEntry::RemoveAllDirInner(const FileEntry &entry) in RemoveAllDirInner() argument
298 string path = entry.GetFilePath().GetPath(); in RemoveAllDirInner()
299 if (entry.IsFile()) { in RemoveAllDirInner()
312 for (const auto &iter : entry.GetChilds()) { in RemoveAllDirInner()
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/sign/
H A DCodeSigning.java79 * Defined entry name of hap file
210 private void createPageInfoExtension(ZipEntry entry) { in createPageInfoExtension() argument
211 long bitmapOff = entry.getCentralDirectory().getOffset() + ZipEntryHeader.HEADER_LENGTH in createPageInfoExtension()
212 + entry.getZipEntryData().getZipEntryHeader().getFileNameLength() + entry.getZipEntryData() in createPageInfoExtension()
221 for (ZipEntry entry : zip.getZipEntries()) { in computeDataSize()
222 ZipEntryHeader zipEntryHeader = entry.getZipEntryData().getZipEntryHeader(); in computeDataSize()
223 EntryType type = entry.getZipEntryData().getType(); in computeDataSize()
229 createPageInfoExtension(entry); in computeDataSize()
233 if (entry in computeDataSize()
[all...]
H A DPageInfoGenerator.java75 for (ZipEntry entry : zipEntries) { in PageInfoGenerator()
76 ZipEntryHeader zipEntryHeader = entry.getZipEntryData().getZipEntryHeader(); in PageInfoGenerator()
77 long entryDataOffset = entry.getCentralDirectory().getOffset() + ZipEntryHeader.HEADER_LENGTH in PageInfoGenerator()
83 if (EntryType.RUNNABLE_FILE.equals(entry.getZipEntryData().getType()) in PageInfoGenerator()
84 && Zip.FILE_UNCOMPRESS_METHOD_FLAG == entry.getZipEntryData().getZipEntryHeader().getMethod()) { in PageInfoGenerator()
/developtools/hdc/src/common/
H A Ddecompress.cpp30 std::optional<Entry> entry = std::nullopt; in DecompressToLocal() local
41 entry = Entry(buff, HEADER_LEN); in DecompressToLocal()
42 if (!entry.value().CopyPayload(decPath, inFile)) { in DecompressToLocal()
43 entry = std::nullopt; in DecompressToLocal()
46 entry = std::nullopt; in DecompressToLocal()
H A Dcompress.cpp67 Entry entry(this->prefix, path); in AddEntry()
69 entrys.push_back(entry); in AddEntry()
90 for (auto& entry : entrys) { in SaveToFile()
91 entry.WriteToTar(file); in SaveToFile()
/developtools/profiler/device/plugins/api/src/
H A Dplugin_watcher.cpp61 struct dirent* entry = nullptr; in ScanPlugins() local
70 entry = readdir(dir); in ScanPlugins()
71 if (!entry) { in ScanPlugins()
75 std::string fileName = entry->d_name; in ScanPlugins()
76 if (entry->d_type & DT_REG) { in ScanPlugins()
/developtools/global_resource_tool/include/
H A Dresource_append.h41 bool ScanSubResources(const FileEntry entry, const std::string &resourcePath,
43 bool ScanSubLimitkeyResources(const FileEntry entry, const std::string &resourcePath,
46 bool ScanLimitKey(const std::unique_ptr<FileEntry> &entry, const std::string &limitKey,
48 bool ScanFiles(const std::unique_ptr<FileEntry> &entry, const DirectoryInfo &directoryInfo,
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/codesigning/utils/
H A DHapUtils.java92 JarEntry entry = inputJar.getJarEntry(configFile); in checkCompressNativeLibs()
93 if (entry == null) { in checkCompressNativeLibs()
96 try (InputStream data = inputJar.getInputStream(entry)) { in checkCompressNativeLibs()
97 String jsonString = new String(InputStreamUtils.toByteArray(data, (int) entry.getSize()), in checkCompressNativeLibs()
122 for (Map.Entry<String, JsonElement> entry : curJsonObject.entrySet()) { in checkCompressNativeLibs()
123 if (entry.getValue().isJsonObject()) { in checkCompressNativeLibs()
124 queue.offer(entry.getValue().getAsJsonObject()); in checkCompressNativeLibs()
/developtools/packing_tool/packing_tool/frameworks/src/
H A Dfast_app_packager.cpp800 for (const auto& entry : fs::directory_iterator(inputPath)) { in packSingleThread()
801 if (!AddOtherFileToZip(entry.path())) { in packSingleThread()
811 bool FastAppPackager::AddOtherFileToZip(const fs::path &entry) in AddOtherFileToZip() argument
813 if (fs::is_regular_file(entry) && entry.filename().string() != Constants::PACK_INFO) { in AddOtherFileToZip()
814 if (isGenerateBuildHash_ && entry.filename().string() == Constants::MODULE_JSON) { in AddOtherFileToZip()
817 std::string zipPath = entry.filename().string(); in AddOtherFileToZip()
818 if (zipWrapper_.AddFileOrDirectoryToZip(entry.string(), zipPath) != ZipErrCode::ZIP_ERR_SUCCESS) { in AddOtherFileToZip()
822 } else if (fs::is_directory(entry)) { in AddOtherFileToZip()
823 if (entry in AddOtherFileToZip()
[all...]
/developtools/smartperf_host/trace_streamer/src/base/
H A Dfile.cpp97 for (const auto &entry : std::filesystem::recursive_directory_iterator(dirPath)) { in GetFilesNameFromDir()
98 if (entry.is_directory()) { in GetFilesNameFromDir()
101 soFiles.emplace_back(onlyFileName ? entry.path().filename().string() : entry.path().string()); in GetFilesNameFromDir()

Completed in 12 milliseconds

123