| /developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/ |
| D | utils.ts | 81 let filePath = toUnixPath(changeFileExtension(cacheFilePath, ext)); 82 if (fs.existsSync(filePath)) { 83 fs.rmSync(filePath); 87 export function shouldETSOrTSFileTransformToJS(filePath: string, projectConfig: Object): boolean { 88 …const sufStr: string = toUnixPath(filePath).replace(toUnixPath(projectConfig.projectRootPath), ''); 96 if (compilingEtsOrTsFiles.indexOf(filePath) !== -1) { // file involves in compilation 97 const hasTsNoCheckOrTsIgnore = hasTsNoCheckOrTsIgnoreFiles.indexOf(filePath) !== -1; 117 let filePath: string; 120 filePath = genTemporaryPath(id, 125 …filePath = genTemporaryPath(id, projectConfig.projectPath, projectConfig.cachePath, projectConfig); [all …]
|
| /developtools/ace_ets2bundle/compiler/test/ark_compiler_ut/common/ |
| D | utils.test.ts | 146 for (const filePath of this.mockfileList) { constant 147 …if (filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_ETS) || filePath.endsWith(EXTNAME_J… 148 …expect(shouldETSOrTSFileTransformToJS(filePath, this.rollup.share.arkProjectConfig) === true).to.b… 158 for (const filePath of this.mockfileList) { constant 159 …if (filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_ETS) || filePath.endsWith(EXTNAME_J… 160 compilingEtsOrTsFiles.push(filePath); 161 hasTsNoCheckOrTsIgnoreFiles.push(filePath); 162 …expect(shouldETSOrTSFileTransformToJS(filePath, this.rollup.share.arkProjectConfig) === true).to.b… 171 for (const filePath of this.mockfileList) { constant 172 …if (filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_ETS) || filePath.endsWith(EXTNAME_J… [all …]
|
| D | ark_utils.test.ts | 131 for (const filePath of this.rollup.share.allFiles) { constant 132 if (filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_JS)) { 133 const originPath = genSourceMapFileName(filePath); 134 const expectedPath = `${filePath}${EXTNAME_MAP}`; 136 } else if (filePath.endsWith(EXTNAME_ETS)) { 137 const originPath = genSourceMapFileName(filePath); 138 expect(originPath === filePath).to.be.true; 145 for (const filePath of this.rollup.share.allFiles) { constant 146 if (filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_JS)) { 147 const originPath = genSourceMapFileName(filePath); [all …]
|
| /developtools/ace_ets2bundle/compiler/test/ark_compiler_ut/mock/class_mock/ |
| D | module_mode_mock.ts | 39 for (const filePath of mockFileList) { constant 40 …if (filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_ETS) || filePath.endsWith(EXTNAME_J… 41 const moduleInfo: object = rollupObject.getModuleInfo(filePath); 43 this.addModuleInfoItem(filePath, isCommonJs, extName, metaInfo, this.moduleInfos); 106 for (const filePath of mockFileList) { constant 107 …if (filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_ETS) || filePath.endsWith(EXTNAME_J… 108 const moduleInfos = rollup.getModuleInfo(filePath); 112 this.getPackageEntryInfo(filePath, metaInfo, this.pkgEntryInfos);
|
| /developtools/ace_ets2bundle/compiler/src/ |
| D | ark_utils.ts | 73 export function getOhmUrlByFilepath(filePath: string, projectConfig: Object, logger: Object, namesp… 75 if (filePath.startsWith('\x00')) { 76 filePath = filePath.replace('\x00', ''); 78 let unixFilePath: string = toUnixPath(filePath); 79 unixFilePath = unixFilePath.substring(0, filePath.lastIndexOf('.')); // remove extension 113 originalFilePath: filePath 255 …const filePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cache… constant 256 if (filePath.length === 0) { 259 mkdirsSync(path.dirname(filePath)); 263 fs.writeFileSync(filePath, sourceCode); [all …]
|
| D | do_arkTS_linter.ts | 104 const filePath = shouldWriteFile ? writeOutputFile(diagnostics) : undefined; constant 105 if (filePath === undefined) { 115 …logMessage = `Has ${diagnostics.length} ArkTS Linter Error. You can get the output in ${filePath}`; 132 let filePath: string = toUnixPath(projectConfig.cachePath); 133 if (!fs.existsSync(filePath)) { 136 filePath = toUnixPath(path.join(filePath, arkTSDir)); 137 if (!fs.existsSync(filePath)) { 138 fs.mkdirSync(filePath); 140 filePath = toUnixPath((path.join(filePath, arkTSLinterOutputFileName))); 153 let output: string | undefined = filePath; [all …]
|
| D | utils.ts | 232 const filePath: string = path.join(dir, element); constant 233 const status: fs.Stats = fs.statSync(filePath); 235 readFile(filePath, utFiles); 237 utFiles.push(filePath); 303 export function tryToLowerCasePath(filePath: string): string { 304 return toUnixPath(filePath).toLowerCase(); 314 export function writeFileSync(filePath: string, content: string): void { 315 if (!fs.existsSync(filePath)) { 316 const parent: string = path.join(filePath, '..'); 321 fs.writeFileSync(filePath, content); [all …]
|
| D | process_import.ts | 86 let filePath: string; 89 filePath = node.moduleSpecifier.getText().replace(/'|"/g, ''); 115 filePath = node.moduleReference.expression.text; 124 const fileResolvePath: string = getFileFullPath(filePath, pagesDir); 132 sourceFile = generateSourceFileAST(fileResolvePath, filePath); 143 function generateSourceFileAST(fileResolvePath: string, filePath: string): ts.SourceFile { 537 function isModule(filePath: string): boolean { 568 function isPackageJsonEntry(filePath: string): boolean { 569 const packageJsonPath: string = path.join(filePath, projectConfig.packageJson); 581 if (entryExist(filePath, entryTypes)) { [all …]
|
| D | gen_abc_plugin.ts | 129 filePath: string; property in ModuleInfo 138 constructor(filePath: string, tempFilePath: string, buildFilePath: string, 140 this.filePath = filePath; 146 this.recordName = getOhmUrlByFilepath(filePath, projectConfig, logger); 147 this.sourceFile = filePath.replace(projectConfig.projectRootPath + path.sep, ''); 301 function getEntryInfo(filePath: string, resourceResolveData: Object): string { 309 if (toUnixPath(filePath) === value) { 317 let entry: string = toUnixPath(filePath.replace(npmInfoPath, '')); 367 function processNodeModulesFile(filePath: string, tempFilePath: string, buildFilePath: string, 369 let npmPkgPath: string = getEntryInfo(filePath, module.resourceResolveData); [all …]
|
| /developtools/ace_ets2bundle/compiler/test/ark_compiler_ut/module/ |
| D | module_mode.test.ts | 103 for (const filePath of fileList) { constant 104 …if (filePath.endsWith(EXTNAME_JS) || filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_ET… 105 const moduleInfo = this.rollup.getModuleInfo(filePath); 113 expect(moduleInfo.filePath.indexOf(ENTRYABILITY_TS_PATH_DEFAULT) > 0 || 114 moduleInfo.filePath.indexOf(ENTRYABILITY_JS_PATH_DEFAULT) > 0 || 115 moduleInfo.filePath.indexOf(INDEX_ETS_PATH_DEFAULT) > 0).to.be.true; 132 for (const filePath of fileList) { constant 133 …if (filePath.endsWith(EXTNAME_JS) || filePath.endsWith(EXTNAME_TS) || filePath.endsWith(EXTNAME_ET… 134 const moduleInfo = this.rollup.getModuleInfo(filePath); 142 expect(moduleInfo.filePath.indexOf(ENTRYABILITY_TS_PATH_DEFAULT) > 0 || [all …]
|
| /developtools/ace_ets2bundle/compiler/ |
| D | uglify-source.js | 26 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)
|
| D | build_kitConfigs_file.js | 101 const filePath = path.join(dir, element); 102 const status = fs.statSync(filePath); 104 readFile(filePath, fileDir); 106 fileDir.push(filePath); 114 const filePath = path.join(dir, file); 115 const status = fs.statSync(filePath); 122 function mkDir(filePath) { argument 123 const parent = path.join(filePath, '..'); 127 fs.mkdirSync(filePath);
|
| /developtools/ace_js2bundle/ace-loader/ |
| D | uglify-source.js | 26 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/packing_tool/adapter/ohos/ |
| D | FileUtils.java | 59 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 …]
|
| /developtools/global_resource_tool/src/ |
| D | file_entry.cpp | 50 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 …]
|
| D | resource_append.cpp | 115 …string filePath = FileEntry::FilePath(outputPath).Append(ResourceUtil::GenerateHash(resourcePath))… in ScanResources() local 116 if (remove(filePath.c_str()) != 0) { in ScanResources() 117 … cerr << "Error: remove failed '" << filePath << "', reason: " << strerror(errno) << endl; in ScanResources() 261 … return ResourceUtil::CopyFleInner(fileInfo.filePath, outPath.Append(ID_DEFINED_FILE).GetPath()); in ScanFile() 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 WriteRawFilesOrResFiles(filePath, outputPath, RAW_FILE_DIR); in ScanSingleFile() 298 if (filePath.find(RES_FILE_DIR) != string::npos) { in ScanSingleFile() 299 return WriteRawFilesOrResFiles(filePath, outputPath, RES_FILE_DIR); in ScanSingleFile() [all …]
|
| D | resource_check.cpp | 70 string filePath = resourceItem.GetFilePath(); in CheckNodeInResourceItem() local 73 if (!GetPngWidthAndHeight(filePath, &width, &height)) { in CheckNodeInResourceItem() 77 cerr << "Warning: the png width and height not equal" << NEW_LINE_PATH << filePath << endl; in CheckNodeInResourceItem() 87 " exceeds the limit (" + to_string(normalSize) + " pixels)" + NEW_LINE_PATH + filePath; in CheckNodeInResourceItem() 106 bool ResourceCheck::GetPngWidthAndHeight(const string &filePath, uint32_t *width, uint32_t *height) in GetPngWidthAndHeight() argument 108 FILE *in = fopen(filePath.c_str(), "rb"); in GetPngWidthAndHeight() 110 cout << "Warning: " << filePath << " can not open" << endl; in GetPngWidthAndHeight() 114 cout << "Warning: " << filePath << " is not png format" << endl; in GetPngWidthAndHeight()
|
| /developtools/profiler/host/smartperf/client/client_command/ |
| D | sp_parse_fps.cpp | 62 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/profiler/device/base/test/unittest/ |
| D | common_test.cpp | 32 bool WriteFile(const std::string& filePath, const std::string& fileContent) in WriteFile() argument 34 FILE* file = fopen(filePath.c_str(), "w"); in WriteFile() 37 …PROFILER_LOG_ERROR(LOG_CORE, "WriteFile: fopen() fail, %s, %s", filePath.c_str(), errorMsg.c_str()… in WriteFile() 109 std::string filePath = "/data/local/tmp/config.txt"; variable 111 EXPECT_TRUE(VerifyPath(filePath, validPaths)); 114 EXPECT_FALSE(VerifyPath(filePath, validPaths)); 117 EXPECT_TRUE(VerifyPath(filePath, validPaths)); 120 EXPECT_TRUE(VerifyPath(filePath, validPaths)); 122 filePath = "/data/local/tmpconfig.txt"; 124 EXPECT_FALSE(VerifyPath(filePath, validPaths));
|
| /developtools/hdc/hdc_rust/src/cffi/ |
| D | log.cpp | 34 string filePath = GetFileNameAny(tmpPath); in PrintLogEx() local 40 filePath.c_str(), line, buf); in PrintLogEx() 44 filePath.c_str(), line, buf); in PrintLogEx() 48 filePath.c_str(), line, buf); in PrintLogEx() 52 filePath.c_str(), line, buf); in PrintLogEx()
|
| /developtools/ace_ets2bundle/compiler/test/ark_compiler_ut/module/ohmUrl/ |
| D | ohmUrl.test.ts | 26 const filePath = `${projectConfig.projectRootPath}/entry/src/main/ets/feature/src/main/js/` constant 30 let ohmUrl_1 = getOhmUrlByFilepath(filePath, projectConfig, undefined, moduleName); 31 let ohmUrl_2 = getOhmUrlByFilepath(filePath, projectConfig, undefined, moduleNamespace); 39 const filePath = `${projectConfig.projectRootPath}/entry/src/ohosTest/ets/feature/src/main/js/` constant 43 let ohmUrl_1 = getOhmUrlByFilepath(filePath, projectConfig, undefined, moduleName); 44 let ohmUrl_2 = getOhmUrlByFilepath(filePath, projectConfig, undefined, moduleNamespace); 84 const filePath = `${projectConfig.projectRootPath}/entry/src/main/ets/pages/test.ts`; constant 88 const ohmUrl = getOhmUrlByFilepath(filePath, projectConfig, undefined, moduleName);
|
| /developtools/ace_js2bundle/ace-loader/plugin/templater/ |
| D | index.js | 30 function parse(source, operate, filePath) { argument 32 process.env.aceModuleRoot || process.cwd(), filePath)).replace(path.parse(filePath).ext, ''); 52 generate(rootArray[rootIndex], filePath, undefined, relativePath) 134 function generate(node, filePath, preNode, relativePath) { argument 137 checkNodeAttrs(node, filePath, preNode, relativePath) 140 checkNodeChildren(node, filePath, relativePath) 150 function checkNodeAttrs(node, filePath, preNode, relativePath) { argument 193 filePath, 261 function checkNodeChildren(node, filePath, relativePath) { argument 279 generate(child, filePath, preNode, relativePath) [all …]
|
| /developtools/ace_js2bundle/ace-loader/test/card/ |
| D | test.js | 26 …const filePath = path.join(__dirname,"testcase/build/pages",`${componentName}`, filaName + `.json`… 27 if(!fs.existsSync(filePath)){ 30 const fileContent = fs.readFileSync(filePath, "utf-8"); 36 const filePath = path.join(__dirname, "expected", `${componentName}`, filaName + `.json`); 37 if(!fs.existsSync(filePath)){ 40 const expectedContent = fs.readFileSync(filePath, "utf-8");
|
| /developtools/ace_js2bundle/ace-loader/src/lite/ |
| D | lite-image-coverter-plugin.js | 44 const filePath = _path.join(rootPath, file); 45 const stats = fs.statSync(filePath); 47 if (REGEXP_PNG.test(filePath)) { 48 pngPathArray.push(filePath); 51 traverseAll(filePath);
|
| /developtools/smartperf_host/trace_streamer/prebuilts/patch_hiperf/ |
| D | file_ex.h | 22 bool LoadStringFromFile(const std::string& filePath, std::string& content); 23 bool SaveStringToFile(const std::string& filePath, const std::string& content, bool truncated = tru… 26 bool LoadBufferFromFile(const std::string& filePath, std::vector<char>& content); 27 bool SaveBufferToFile(const std::string& filePath, const std::vector<char>& content, bool truncated…
|