Home
last modified time | relevance | path

Searched refs:filePath (Results 1 – 25 of 78) sorted by relevance

1234

/developtools/global_resource_tool/src/
Dincrement_list.cpp47 bool IncrementList::GetFromPath(const string &filePath, FileIncrement &info) const in GetFromPath() argument
49 int32_t priority = GetPriority(filePath); in GetFromPath()
51 cerr << "Error: " << RESTOOL_LIST_FILE << " '" << filePath << "' invalid." << endl; in GetFromPath()
56 info.relativePath = filePath.substr(rootPath.length()); in GetFromPath()
62 info.dirPath = FileEntry::FilePath(filePath).GetParent().GetPath(); in GetFromPath()
63 info.filePath = filePath; in GetFromPath()
70 cerr << "Error: '" << filePath << "' '" << info.limitKey << "' invalid limit key." << endl; in GetFromPath()
77 cerr << "Error: '" << filePath << "' '" << info.fileCluster << "' invalid ResType." << endl; in GetFromPath()
84 int32_t IncrementList::GetPriority(const string &filePath) const in GetPriority()
86 auto result = find_if(folder_.begin(), folder_.end(), [&filePath](auto &iter) { in GetPriority()
[all …]
Dpreview_manager.cpp68 bool PreviewManager::ScanFile(const string &filePath, int32_t priority) in ScanFile() argument
70 if (!ResourceUtil::FileExist(filePath)) { in ScanFile()
71 cerr << "Error: " << filePath << " non't exist." << endl; in ScanFile()
75 fileInfo.filePath = filePath; in ScanFile()
76 fileInfo.filename = FileEntry::FilePath(filePath).GetFilename(); in ScanFile()
77 fileInfo.dirPath = FileEntry::FilePath(filePath).GetParent().GetPath(); in ScanFile()
Dfile_entry.cpp44 string filePath = filePath_.GetPath(); in Init() local
45 if (!Exist(filePath)) { in Init()
46 cerr << "Error: '" << filePath << "' not exists." << endl; in Init()
50 isFile_ = !IsDirectory(filePath); in Init()
58 string filePath = filePath_.GetPath(); in GetChilds() local
59 DIR *handle = opendir(filePath.c_str()); in GetChilds()
66 filePath = filePath_.GetPath() + SEPARATE + filename; in GetChilds()
67 unique_ptr<FileEntry> f = make_unique<FileEntry>(filePath); in GetChilds()
145 string filePath = filePath_ + SEPARATE + path; in Append() local
146 return FilePath(filePath); in Append()
[all …]
Dsolid_xml_compiler.cpp38 cerr << "Error: '" << fileInfo.filePath << "' should be xml file." << endl; in CompileSingleFile()
59 xmlDocPtr doc = xmlParseFile(fileInfo.filePath.c_str()); in ParseXml()
73 resourceItem.SetFilePath(fileInfo.filePath); in ParseXml()
104 cerr << "Error: '" << idValue << "' duplicated in " << fileInfo.filePath << endl; in ParseNodeId()
Dresource_merge.cpp50 string filePath = FileEntry::FilePath(*it).Append(ConfigParser::GetConfigName()).GetPath(); in Init() local
53 if (!ResourceUtil::FileExist(filePath)) { in Init()
57 ConfigParser configParser(filePath); in Init()
Dreference_parser.cpp70 string filePath = FileEntry::FilePath(solidXmlFolder) in ParseRefInSolidXml() local
72 if (!ResourceUtil::FileExist(filePath)) { in ParseRefInSolidXml()
77 if (!xmlKeyNode.LoadFromFile(filePath, [this](auto &key) -> bool { in ParseRefInSolidXml()
83 if (!xmlKeyNode.SaveToFile(filePath)) { in ParseRefInSolidXml()
138 uint32_t ReferenceParser::ParseRefInJson(const string &filePath) const in ParseRefInJson()
141 if (!ResourceUtil::OpenJsonFile(filePath, root)) { in ParseRefInJson()
149 if (!ResourceUtil::SaveToJsonFile(filePath, root)) { in ParseRefInJson()
Dgeneric_compiler.cpp53 resourceItem.SetFilePath(fileInfo.filePath); in PostFile()
63 cerr << "Error: resource item set data fail, " << fileInfo.filePath << endl; in PostFile()
100 return ResourceUtil::CopyFleInner(fileInfo.filePath, GetOutputFilePath(fileInfo)); in CopyFile()
/developtools/ace-ets2bundle/compiler/
Duglify-source.js26 const filePath = path.join(inputPath, file)
27 if (fs.existsSync(filePath)) {
28 const fileStat = fs.statSync(filePath)
30 const code = fs.readFileSync(filePath, 'utf-8')
31 uglifyCode(code,filePath)
34 readCode(filePath)
Dbuild_declarations_file.js34 function generateTargetFile(filePath, output) { argument
36 const globalTsFile = path.resolve(filePath, '../../global.d.ts');
37 const featureAbilityPath = path.resolve(filePath, '../../../common/full/featureability.d.ts');
38 const middleTsFile = path.resolve(filePath, 'middle_class.d.ts');
45 readFile(filePath, files);
81 const filePath = path.join(dir, element);
82 const status = fs.statSync(filePath);
84 readFile(filePath, fileDir);
86 fileDir.push(filePath);
91 function mkDir(filePath) { argument
[all …]
/developtools/ace-js2bundle/ace-loader/
Duglify-source.js26 const filePath = path.join(inputPath, file)
27 if (fs.existsSync(filePath)) {
28 const fileStat = fs.statSync(filePath)
30 const code = fs.readFileSync(filePath, 'utf-8')
31 uglifyCode(code,filePath)
34 readCode(filePath)
/developtools/global_resource_tool/src/xml/
Dxml_key_node.cpp50 bool XmlKeyNode::SaveToFile(const string &filePath) const in SaveToFile()
52 ofstream out(filePath, ofstream::out | ofstream::binary); in SaveToFile()
54 cerr << "Error: open fail," << filePath << endl; in SaveToFile()
71 bool XmlKeyNode::LoadFromFile(const string &filePath) in LoadFromFile() argument
73 return LoadFromFile(filePath, nullptr); in LoadFromFile()
76 bool XmlKeyNode::LoadFromFile(const std::string &filePath, RefParser parser) in LoadFromFile() argument
78 ifstream in(filePath, ifstream::in | ifstream::binary); in LoadFromFile()
80 cerr << "Error: open fail," << filePath << endl; in LoadFromFile()
Dxml_converter.cpp42 …string filePath = FileEntry::FilePath(outputPath_).Append(filename).ReplaceExtension(".sxml").GetP… in GenerateSolidXml() local
43 if (!solidXml.GenerateSolidXml(filePath)) { in GenerateSolidXml()
/developtools/ace-ets2bundle/compiler/src/
Dprocess_import.ts57 let filePath: string;
60 filePath = node.moduleSpecifier.getText().replace(/'|"/g, '');
85 filePath = node.moduleReference.expression.text;
92 if (filePath && path.extname(filePath) !== EXTNAME_ETS && !isModule(filePath)) {
93 const dirIndexPath: string = path.resolve(path.resolve(pagesDir, filePath), INDEX_ETS);
94 …if (/^(\.|\.\.)\//.test(filePath) && !fs.existsSync(path.resolve(pagesDir, filePath + EXTNAME_ETS)…
96 filePath = dirIndexPath;
98 filePath += EXTNAME_ETS;
103 if (/^(\.|\.\.)\//.test(filePath) && filePath.indexOf(NODE_MODULES) < 0) {
104 fileResolvePath = path.resolve(pagesDir, filePath);
[all …]
Dutils.ts149 const filePath: string = path.join(dir, element); constant
150 const status: fs.Stats = fs.statSync(filePath);
152 readFile(filePath, utFiles);
154 utFiles.push(filePath);
239 export function writeFileSync(filePath: string, content: string): void {
240 if (!fs.existsSync(filePath)) {
241 const parent: string = path.join(filePath, '..');
246 fs.writeFileSync(filePath, content);
284 export function validateFilePathLength(filePath: string): boolean {
289 } else if (filePath.length > 0 && filePath.length <= maxFilePathLength()) {
[all …]
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/
DFileUtils.java142 public static boolean isFileExist(String filePath) { in isFileExist() argument
143 return new File(filePath).exists(); in isFileExist()
152 public static void validFileType(String filePath, String... types) { in validFileType() argument
153 String suffix = getSuffix(filePath); in validFileType()
155 ERROR.NOT_SUPPORT_ERROR, "Not support file: " + filePath); in validFileType()
166 …lidateUtils.throwIfNotMatches(isMatches, ERROR.NOT_SUPPORT_ERROR, "Not support file: " + filePath); in validFileType()
175 public static String getSuffix(String filePath) { in getSuffix() argument
176 if (StringUtils.isEmpty(filePath)) { in getSuffix()
179 File file = new File(filePath); in getSuffix()
238 public static long getFileLen(String filePath) { in getFileLen() argument
[all …]
/developtools/ace-js2bundle/ace-loader/test/card/
Dtest.js28 …const filePath = path.join(__dirname,"testcase/build/pages",`${componentName}`, filaName + `.json`…
29 if(!fs.existsSync(filePath)){
32 const fileContent = fs.readFileSync(filePath, "utf-8");
38 const filePath = path.join(__dirname, "expected", `${componentName}`, filaName + `.json`);
39 if(!fs.existsSync(filePath)){
42 const expectedContent = fs.readFileSync(filePath, "utf-8");
/developtools/packing_tool/adapter/ohos/
DFileUtils.java50 public static byte[] getFileData(final String filePath) { in getFileData() argument
51 File file = new File(filePath); in getFileData()
99 public static void getFileList(final String filePath, ArrayList<String> fileList) { in getFileList() argument
100 File file = new File(filePath); in getFileList()
132 private static Optional<String> getFileContent(final String filePath) { in getFileContent() argument
133 if (filePath.isEmpty()) { in getFileContent()
141 fileInputStream = new FileInputStream(filePath); in getFileContent()
169 final String jsonFileName, final String filePath) { in getValueFromJsonFileContent() argument
170 Optional<String> jsonFilePath = searchFile(jsonFileName, filePath); in getValueFromJsonFileContent()
324 public static Optional<String> getFormatedPath(final String filePath) { in getFormatedPath() argument
[all …]
DBinaryTool.java43 public static boolean generateBinaryFile(final String filePath, final String binaryFilePath) { in generateBinaryFile() argument
44 Optional<String> absPath = FileUtils.getFormatedPath(filePath); in generateBinaryFile()
89 private static boolean writePackageInfo(final String filePath, RandomAccessFile appStream) { in writePackageInfo() argument
91 JSON_FILE_NAME, filePath); in writePackageInfo()
118 …private static void writeFileInfo(final String filePath, final String directory, boolean isWindows, in writeFileInfo() argument
120 File file = new File(filePath); in writeFileInfo()
/developtools/ace-js2bundle/ace-loader/plugin/templater/
Dindex.js30 function parse(source, operate, filePath) { argument
32 process.env.aceModuleRoot || process.cwd(), filePath)).replace(path.parse(filePath).ext, '');
50 generate(rootArray[rootIndex], filePath, undefined, relativePath)
133 function generate(node, filePath, preNode, relativePath) { argument
136 checkNodeAttrs(node, filePath, preNode, relativePath)
139 checkNodeChildren(node, filePath, relativePath)
149 function checkNodeAttrs(node, filePath, preNode, relativePath) { argument
192 filePath,
260 function checkNodeChildren(node, filePath, relativePath) { argument
278 generate(child, filePath, preNode, relativePath)
[all …]
/developtools/ace-js2bundle/ace-loader/src/
DgenBin-plugin.js108 function qjscSecond(filePath) { argument
109 let data = fs.readFileSync(filePath, 'utf8')
111 const lastFilePath = filePath.replace(/\.c$/, lastFileEXT)
117 if (fs.existsSync(filePath)) {
118 fs.unlinkSync(filePath)
120 console.error('\u001b[31m', `Failed to clean file ${filePath}.`, '\u001b[39m')
/developtools/global_resource_tool/include/
Dxml_key_node.h32 bool SaveToFile(const std::string &filePath) const;
33 bool LoadFromFile(const std::string &filePath);
35 bool LoadFromFile(const std::string &filePath, RefParser parser);
Dincrement_list.h40 bool GetFromPath(const std::string &filePath, FileIncrement &info) const;
41 int32_t GetPriority(const std::string &filePath) const;
42 bool ParseSegment(const std::string &filePath, std::vector<std::string> &segments) const;
/developtools/profiler/host/smartperf/ide/
Dbuild.js41 let filePath = path.join(__dirname, value)
48 cpFile(filePath, distFile);
98 let filePath = path.join(src, value);
99 let fileSys = fs.statSync(filePath);
101 fs.copyFileSync(filePath, path.join(dest, value));
103 copyDirectory(filePath, path.join(dest, value));
/developtools/profiler/hidebug/interfaces/js/kits/napi/
Dnapi_hidebug.cpp59 std::string filePath = PROC_PATH + std::to_string(getpid()) + ROOT_DIR + filesDir + SLASH_STR + in StartProfiling() local
61 if (!FileUtil::IsLegalPath(filePath)) { in StartProfiling()
64 if (!CreateFile(filePath)) { in StartProfiling()
68 engine->StartCpuProfiler(filePath); in StartProfiling()
90 std::string filePath = PROC_PATH + std::to_string(getpid()) + ROOT_DIR + filesDir + SLASH_STR + in DumpHeapData() local
92 if (!FileUtil::IsLegalPath(filePath)) { in DumpHeapData()
95 if (!CreateFile(filePath)) { in DumpHeapData()
99 engine->DumpHeapSnapShot(filePath); in DumpHeapData()
164 std::string filePath = "/proc/" + std::to_string(pid) + "/smaps_rollup"; in GetProcessMeminfo() local
165 FILE* smapsRollupInfo = fopen(filePath.c_str(), "r"); in GetProcessMeminfo()
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/test/java/com/ohos/hapsigntool/
DProfileTest.java164 private void loadFile(String filePath) throws IOException { in loadFile() argument
166 InputStream fileInputStream = classLoader.getResourceAsStream(filePath); in loadFile()
169 FileUtils.write(fileData, new File(filePath)); in loadFile()
185 private void deleteFile(String filePath) throws IOException { in deleteFile() argument
186 if (FileUtils.isFileExist(filePath)) { in deleteFile()
187 Path path = Paths.get(filePath); in deleteFile()

1234