| /developtools/ace_ets2bundle/compiler/src/ |
| D | do_arkTS_linter.ts | 83 const filePath = shouldWriteFile ? writeOutputFile(diagnostics) : undefined; constant 84 if (filePath === undefined) { 94 …logMessage = `Has ${diagnostics.length} ArkTS Linter Error. You can get the output in ${filePath}`; 111 let filePath: string = toUnixPath(projectConfig.cachePath); 112 if (!fs.existsSync(filePath)) { 115 filePath = toUnixPath(path.join(filePath, arkTSDir)); 116 if (!fs.existsSync(filePath)) { 117 fs.mkdirSync(filePath); 119 filePath = toUnixPath((path.join(filePath, arkTSLinterOutputFileName))); 132 let output: string | undefined = filePath; [all …]
|
| D | ark_utils.ts | 70 export function getOhmUrlByFilepath(filePath: string, projectConfig: any, logger: any, namespace?: … 72 if (filePath.startsWith('\x00')) { 73 filePath = filePath.replace('\x00', ''); 75 let unixFilePath: string = toUnixPath(filePath); 76 unixFilePath = unixFilePath.substring(0, filePath.lastIndexOf('.')); // remove extension 125 …logger.error(red, `ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "${filePath}"`, reset); 126 return filePath; 152 …logger.error(red, `ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "${filePath}"`, reset); 153 return filePath; 206 …const filePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cache… constant [all …]
|
| D | utils.ts | 227 const filePath: string = path.join(dir, element); constant 228 const status: fs.Stats = fs.statSync(filePath); 230 readFile(filePath, utFiles); 232 utFiles.push(filePath); 305 export function writeFileSync(filePath: string, content: string): void { 306 if (!fs.existsSync(filePath)) { 307 const parent: string = path.join(filePath, '..'); 312 fs.writeFileSync(filePath, content); 315 export function genTemporaryPath(filePath: string, projectPath: string, buildPath: string, 317 filePath = toUnixPath(filePath).replace(/\.[cm]js$/, EXTNAME_JS); [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: any): string { 309 if (toUnixPath(filePath) === value) { 317 let entry: string = toUnixPath(filePath.replace(npmInfoPath, '')); 367 function processNodeModulesFile(filePath: string, tempFilePath: string, buildFilePath: string, abcF… 368 let npmPkgPath: string = getEntryInfo(filePath, module.resourceResolveData); [all …]
|
| D | process_import.ts | 87 let filePath: string; 90 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 { 550 function isModule(filePath: string): boolean { 575 function isPackageJsonEntry(filePath: string): boolean { 576 const packageJsonPath: string = path.join(filePath, projectConfig.packageJson); 588 if (entryExist(filePath, entryTypes)) { [all …]
|
| /developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/ |
| D | utils.ts | 73 let filePath = toUnixPath(changeFileExtension(cacheFilePath, ext)); 74 if (fs.existsSync(filePath)) { 75 fs.rmSync(filePath); 79 export function shouldETSOrTSFileTransformToJS(filePath: string, projectConfig: any): boolean { 80 …const sufStr: string = toUnixPath(filePath).replace(toUnixPath(projectConfig.projectRootPath), ''); 88 if (compilingEtsOrTsFiles.indexOf(filePath) !== -1) { // file involves in compilation 89 const hasTsNoCheckOrTsIgnore = hasTsNoCheckOrTsIgnoreFiles.indexOf(filePath) !== -1; 108 let filePath: string; 111 filePath = genTemporaryPath(id, 116 …filePath = genTemporaryPath(id, projectConfig.projectPath, projectConfig.cachePath, projectConfig); [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_declarations_file.js | 35 function generateTargetFile(filePath, output) { argument 37 const globalTsFile = path.resolve(filePath, '../../ets/global.d.ts'); 38 const featureAbilityPath = path.resolve(filePath, '../../../common/full/featureability.d.ts'); 39 const middleTsFile = path.resolve(filePath, 'middle_class.d.ts'); 46 readFile(filePath, files); 92 const filePath = path.join(dir, element); 93 const status = fs.statSync(filePath); 95 readFile(filePath, fileDir); 97 fileDir.push(filePath); 102 function mkDir(filePath) { argument [all …]
|
| /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 …]
|
| D | BinaryTool.java | 44 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/ |
| 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 | 114 …string filePath = FileEntry::FilePath(outputPath).Append(ResourceUtil::GenerateHash(resourcePath))… in ScanResources() local 115 if (remove(filePath.c_str()) != 0) { in ScanResources() 116 … cerr << "Error: remove failed '" << filePath << "', reason: " << strerror(errno) << endl; in ScanResources() 260 … return ResourceUtil::CopyFleInner(fileInfo.filePath, outPath.Append(ID_DEFINED_FILE).GetPath()); in ScanFile() 283 string hash = ResourceUtil::GenerateHash(fileInfo.filePath); in ScanFile() 291 bool ResourceAppend::ScanSingleFile(const string &filePath, const string &outputPath) in ScanSingleFile() argument 293 if (filePath.find(RAW_FILE_DIR) != string::npos) { in ScanSingleFile() 294 return WriteRawFile(filePath, outputPath); in ScanSingleFile() 297 FileEntry::FilePath path(filePath); in ScanSingleFile() 301 cerr << "Error: invalid resType." << NEW_LINE_PATH << filePath << endl; 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()
|
| D | append_compiler.cpp | 31 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/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 … HILOG_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/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…
|
| /developtools/profiler/host/smartperf/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…
|
| /developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/ |
| D | FileUtils.java | 246 public static boolean isFileExist(String filePath) { in isFileExist() argument 247 return new File(filePath).exists(); in isFileExist() 256 public static void validFileType(String filePath, String... types) { in validFileType() argument 257 String suffix = getSuffix(filePath); in validFileType() 259 ERROR.NOT_SUPPORT_ERROR, "Not support file: " + filePath); in validFileType() 270 …lidateUtils.throwIfNotMatches(isMatches, ERROR.NOT_SUPPORT_ERROR, "Not support file: " + filePath); in validFileType() 279 public static String getSuffix(String filePath) { in getSuffix() argument 280 if (StringUtils.isEmpty(filePath)) { in getSuffix() 283 File file = new File(filePath); in getSuffix() 345 public static long getFileLen(String filePath) { in getFileLen() argument [all …]
|
| /developtools/ace_js2bundle/ace-loader/src/ |
| D | genBin-plugin.js | 108 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')
|