Home
last modified time | relevance | path

Searched refs:filePath (Results 1 – 25 of 100) 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 << "' invalid." << NEW_LINE_PATH << filePath << 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: '" << info.limitKey << "' invalid limit key." << NEW_LINE_PATH << filePath << endl; in GetFromPath()
77 …cerr << "Error: '" << info.fileCluster << "' invalid ResType." << NEW_LINE_PATH << filePath << end… 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.cpp50 string filePath = filePath_.GetPath(); in Init() local
51 if (!Exist(filePath)) { in Init()
52 cerr << "Error: '" << filePath << "' not exists." << endl; in Init()
56 isFile_ = !IsDirectory(filePath); in Init()
63 string filePath = filePath_.GetPath(); in GetChilds() local
66 string temp(filePath + "\\*.*"); in GetChilds()
78 filePath = filePath_.GetPath() + SEPARATE + filename; in GetChilds()
79 unique_ptr<FileEntry> f = make_unique<FileEntry>(filePath); in GetChilds()
85 DIR *handle = opendir(filePath.c_str()); in GetChilds()
93 filePath = filePath_.GetPath() + SEPARATE + filename; in GetChilds()
[all …]
Dresource_append.cpp121 …string filePath = FileEntry::FilePath(outputPath).Append(ResourceUtil::GenerateHash(resourcePath))… in ScanResources() local
122 if (remove(filePath.c_str()) != 0) { in ScanResources()
123 … cerr << "Error: remove failed '" << filePath << "', reason: " << strerror(errno) << endl; in ScanResources()
284 string hash = ResourceUtil::GenerateHash(fileInfo.filePath); in ScanFile()
292 bool ResourceAppend::ScanSingleFile(const string &filePath, const string &outputPath) in ScanSingleFile() argument
294 if (filePath.find(RAW_FILE_DIR) != string::npos) { in ScanSingleFile()
295 return WriteRawFile(filePath, outputPath); in ScanSingleFile()
298 FileEntry::FilePath path(filePath); in ScanSingleFile()
302 cerr << "Error: invalid resType." << NEW_LINE_PATH << filePath << endl; in ScanSingleFile()
309 cerr << "Error: invalid limit key." << NEW_LINE_PATH << filePath << endl; in ScanSingleFile()
[all …]
Dappend_compiler.cpp31 resourceItem.SetFilePath(fileInfo.filePath); in CompileSingleFile()
34 string data = fileInfo.filePath; in CompileSingleFile()
36 …"Error: resource item set data fail, data: " << data << NEW_LINE_PATH << fileInfo.filePath << endl; in CompileSingleFile()
/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/
Dutils.ts79 let filePath: string;
82 filePath = genTemporaryPath(id,
87filePath = genTemporaryPath(id, projectConfig.projectPath, projectConfig.cachePath, projectConfig);
96 await writeFileContent(id, filePath, content, projectConfig, logger);
99 mkdirsSync(path.dirname(filePath));
100 fs.writeFileSync(filePath, content, 'utf-8');
107 async function writeFileContent(sourceFilePath: string, filePath: string, content: string, projectC…
109 filePath = changeFileExtension(filePath, EXTNAME_JS);
112 mkdirsSync(path.dirname(filePath));
118 …await writeMinimizedSourceCode(content, filePath, logger, isHar, relativeSourceFilePath, newSource…
[all …]
/developtools/ace_ets2bundle/compiler/src/
Dutils.ts199 const filePath: string = path.join(dir, element); constant
200 const status: fs.Stats = fs.statSync(filePath);
202 readFile(filePath, utFiles);
204 utFiles.push(filePath);
277 export function writeFileSync(filePath: string, content: string): void {
278 if (!fs.existsSync(filePath)) {
279 const parent: string = path.join(filePath, '..');
284 fs.writeFileSync(filePath, content);
287 export function genTemporaryPath(filePath: string, projectPath: string, buildPath: string,
289 filePath = toUnixPath(filePath).replace(/\.[cm]js$/, EXTNAME_JS);
[all …]
Dark_utils.ts63 export function getOhmUrlByFilepath(filePath: string, projectConfig: any, logger: any, namespace?: …
65 if (filePath.startsWith('\x00')) {
66 filePath = filePath.replace('\x00', '');
68 let unixFilePath: string = toUnixPath(filePath);
69 unixFilePath = unixFilePath.substring(0, filePath.lastIndexOf('.')); // remove extension
118 …logger.error(red, `ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "${filePath}"`, reset);
119 return filePath;
145 …logger.error(red, `ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "${filePath}"`, reset);
146 return filePath;
188 …const filePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cache… constant
[all …]
Dprocess_import.ts82 let filePath: string;
85 filePath = node.moduleSpecifier.getText().replace(/'|"/g, '');
110 filePath = node.moduleReference.expression.text;
118 if (filePath) {
123 let fileResolvePath: string = getFileFullPath(filePath, pagesDir);
131 sourceFile = generateSourceFileAST(fileResolvePath, filePath);
142 export function generateSourceFileAST(fileResolvePath: string, filePath: string): ts.SourceFile {
149 return ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
507 function isModule(filePath: string): boolean {
526 function isPackageJsonEntry(filePath: string): boolean {
[all …]
Dgen_abc_plugin.ts131 filePath: string; property in ModuleInfo
140 constructor(filePath: string, tempFilePath: string, buildFilePath: string,
142 this.filePath = filePath;
148 this.recordName = getOhmUrlByFilepath(filePath, projectConfig, logger);
149 this.sourceFile = filePath.replace(projectConfig.projectRootPath + path.sep, '');
303 function getEntryInfo(filePath: string, resourceResolveData: any): string {
311 if (toUnixPath(filePath) === value) {
319 let entry: string = toUnixPath(filePath.replace(npmInfoPath, ''));
369 function processNodeModulesFile(filePath: string, tempFilePath: string, buildFilePath: string, abcF…
370 let npmPkgPath: string = getEntryInfo(filePath, module.resourceResolveData);
[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/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, '../../ets/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);
91 const filePath = path.join(dir, element);
92 const status = fs.statSync(filePath);
94 readFile(filePath, fileDir);
96 fileDir.push(filePath);
101 function mkDir(filePath) { argument
[all …]
/developtools/packing_tool/adapter/ohos/
DFileUtils.java59 public static byte[] getFileData(final String filePath) { in getFileData() argument
60 File file = new File(filePath); in getFileData()
108 public static void getFileList(final String filePath, ArrayList<String> fileList) { in getFileList() argument
109 File file = new File(filePath); in getFileList()
141 public static Optional<String> getFileContent(final String filePath) { in getFileContent() argument
142 if (filePath.isEmpty()) { in getFileContent()
150 fileInputStream = new FileInputStream(filePath); in getFileContent()
221 String filePath = destDir + File.separator + entry.getName(); in unzip() local
222 if (!matchPattern(filePath)) { in unzip()
223 throw new BundleException("Input invalid file " + filePath); in unzip()
[all …]
DBinaryTool.java44 public static boolean generateBinaryFile(final String filePath, final String binaryFilePath) { in generateBinaryFile() argument
45 Optional<String> absPath = FileUtils.getFormatedPath(filePath); in generateBinaryFile()
90 private static boolean writePackageInfo(final String filePath, RandomAccessFile appStream) { in writePackageInfo() argument
92 JSON_FILE_NAME, filePath); in writePackageInfo()
119 …private static void writeFileInfo(final String filePath, final String directory, boolean isWindows, in writeFileInfo() argument
121 File file = new File(filePath); in writeFileInfo()
173 … final String jsonFileName, final String filePath) { in getValueFromJsonFileContent() argument
174 Optional<String> jsonFilePath = FileUtils.searchFile(jsonFileName, filePath); in getValueFromJsonFileContent()
/developtools/global_resource_tool/src/xml/
Dxml_key_node.cpp51 bool XmlKeyNode::SaveToFile(const string &filePath) const in SaveToFile()
53 ofstream out(filePath, ofstream::out | ofstream::binary); in SaveToFile()
55 cerr << "Error: open failed '" << filePath << "', reason: " << strerror(errno) << endl; in SaveToFile()
72 bool XmlKeyNode::LoadFromFile(const string &filePath) in LoadFromFile() argument
74 return LoadFromFile(filePath, nullptr); in LoadFromFile()
77 bool XmlKeyNode::LoadFromFile(const std::string &filePath, RefParser parser) in LoadFromFile() argument
79 ifstream in(filePath, ifstream::in | ifstream::binary); in LoadFromFile()
81 cerr << "Error: open failed '" << filePath << "', reason: " << strerror(errno) << endl; in LoadFromFile()
/developtools/profiler/device/base/test/unittest/
Dcommon_test.cpp32 void WriteFile(const std::string& filePath, const std::string& fileContent) in WriteFile() argument
34 FILE* file = fopen(filePath.c_str(), "w"); in WriteFile()
37 … HILOG_ERROR(LOG_CORE, "WriteFile: fopen() fail, %s, %s", filePath.c_str(), errorMsg.c_str()); in WriteFile()
107 std::string filePath = "/data/local/tmp/config.txt"; variable
109 EXPECT_TRUE(VerifyPath(filePath, validPaths));
112 EXPECT_FALSE(VerifyPath(filePath, validPaths));
115 EXPECT_TRUE(VerifyPath(filePath, validPaths));
118 EXPECT_TRUE(VerifyPath(filePath, validPaths));
120 filePath = "/data/local/tmpconfig.txt";
122 EXPECT_FALSE(VerifyPath(filePath, validPaths));
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/
DFileUtils.java143 public static boolean isFileExist(String filePath) { in isFileExist() argument
144 return new File(filePath).exists(); in isFileExist()
153 public static void validFileType(String filePath, String... types) { in validFileType() argument
154 String suffix = getSuffix(filePath); in validFileType()
156 ERROR.NOT_SUPPORT_ERROR, "Not support file: " + filePath); in validFileType()
167 …lidateUtils.throwIfNotMatches(isMatches, ERROR.NOT_SUPPORT_ERROR, "Not support file: " + filePath); in validFileType()
176 public static String getSuffix(String filePath) { in getSuffix() argument
177 if (StringUtils.isEmpty(filePath)) { in getSuffix()
180 File file = new File(filePath); in getSuffix()
239 public static long getFileLen(String filePath) { in getFileLen() argument
[all …]
/developtools/profiler/host/smartperf/client/client_command/
Dsp_parse_fps.cpp62 const FpsResult ParseFPS::ParseBranch(FilePath& filePath, PackageName& pN, PageType& pT, TouchEvent… in ParseBranch() argument
73 if (filePath.find(FLING) != SpString::npos) { in ParseBranch()
75 fps = PraseFPSTrace(filePath, staticTime, uiPoint); in ParseBranch()
77 fps = PraseFPSTrace(filePath, staticTime, videoPoint); in ParseBranch()
82 fps = PraseFPSTrace(filePath, staticTime, webPoint); in ParseBranch()
86 fps = PraseFPSTrace(filePath, staticTime, uiPoint); in ParseBranch()
93 FpsResult ParseFPS::ParseTraceFile(FilePath& filePath, PackageName& packageName) in ParseTraceFile() argument
95 if (filePath.empty() || packageName.empty()) { in ParseTraceFile()
100 inFile->open(filePath); in ParseTraceFile()
102 std::cout<<"File: "<<filePath<<" open failed!"<<std::endl; in ParseTraceFile()
[all …]
/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/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/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);
/developtools/profiler/host/smartperf/ide/
Dbuild.js115 let filePath = path.join(__dirname, value)
122 cpFile(filePath, distFile);
194 let filePath = path.join(src, value);
195 let fileSys = fs.statSync(filePath);
198 log.info("cp file %s to %s", filePath, destPath)
199 fs.copyFileSync(filePath, destPath);
201 copyDirectory(filePath, path.join(dest, value));
/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/module/
Dmodule_mode.ts85 filePath: string; property in ModuleInfo
92 …constructor(filePath: string, cacheFilePath: string, isCommonJs: boolean, recordName: string, sour…
95 this.filePath = filePath;
175 …private getPackageEntryInfo(filePath: string, metaInfo: any, pkgEntryInfos: Map<String, PackageEnt…
178 …const pkgBuildPath: string = getOhmUrlByFilepath(filePath, this.projectConfig, this.logger, metaIn…
191 this.logger.debug("Failed to get 'pkgPath' from metaInfo. File: ", filePath);
195 let originPkgEntryPath: string = toUnixPath(filePath.replace(pkgPath, ''));
251 …private addModuleInfoItem(filePath: string, isCommonJs: boolean, extName: string, metaInfo: any, m…
253 …let recordName: string = getOhmUrlByFilepath(filePath, this.projectConfig, this.logger, namespace);
254 let sourceFile: string = filePath.replace(this.projectConfig.projectRootPath + path.sep, '');
[all …]

1234