Home
last modified time | relevance | path

Searched refs:fs (Results 1 – 25 of 73) sorted by relevance

123

/developtools/ace_js2bundle/ace-loader/src/
DgenBin-plugin.js16 const fs = require('fs') constant
51 …if (!fs.existsSync(path.resolve(webpackPath, 'qjsc.exe')) && !fs.existsSync(path.resolve(webpackPa…
74 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
77 fs.writeFileSync(output, inputString)
78 if (fs.existsSync(output)){
87 if (!(fs.existsSync(parent) && !fs.statSync(parent).isFile())) {
90 fs.mkdirSync(path_)
100 if (fs.existsSync(inputPath)) {
101 fs.unlinkSync(inputPath)
109 let data = fs.readFileSync(filePath, 'utf8')
[all …]
DgenAbc-plugin.js16 const fs = require('fs'); constant
79 if (fs.existsSync(path.resolve(arkDir, 'build-win'))) {
81 } else if (fs.existsSync(path.resolve(arkDir, 'build-mac'))) {
83 } else if (!fs.existsSync(path.resolve(arkDir, 'build'))) {
174 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
178 fs.writeFileSync(output, inputString);
191 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
194 fs.writeFileSync(cacheOutputPath, inputString);
195 if (fs.existsSync(cacheOutputPath)) {
196 let fileSize = fs.statSync(cacheOutputPath).size;
[all …]
Dcard-loader.js17 import fs from 'fs'
64 if (!fs.existsSync(compResourcepath)) {
108 if (fs.existsSync(styleFileName)) {
113 if (fs.existsSync(styleFileName)) {
118 if (fs.existsSync(styleFileName)) {
123 if (fs.existsSync(styleFileName)) {
137 if (fs.existsSync(fileName + '.json') && !fs.existsSync(fileName + '.js')) {
139 } else if (fs.existsSync(fileName + '.js') && !fs.existsSync(fileName + '.json')) {
145 } else if (fs.existsSync(fileName + '.json') && fs.existsSync(fileName + '.js')) {
Dcompile-plugin.js16 const fs = require('fs'); constant
61 if (module.resource && fs.existsSync(module.resource)) {
74 if (fs.existsSync(commonPath)) {
79 if (fs.existsSync(i18nPath)) {
176 if (fs.existsSync(entryFile)) {
177 const oldArray = JSON.parse(fs.readFileSync(entryFile));
181 } else if (!fs.existsSync(cachePath)) {
185 fs.writeFileSync(entryFile, JSON.stringify(entryArray));
194 fs.writeFile(path.resolve(buildPath, 'compile_error.log'), content, (err) => {
318 if (!fs.existsSync(process.env.aceSoPath)) {
[all …]
/developtools/ace_js2bundle/ace-loader/
Dmain.product.js17 var fs = require('fs') variable
28 if (fs.existsSync(systemModulesPath)) {
29 systemModules.push(...fs.readdirSync(systemModulesPath));
35 if (fs.existsSync(url)) {
36 files = fs.readdirSync(url);
39 if (fs.statSync(curPath).isDirectory()) {
42 fs.unlinkSync(curPath);
45 fs.rmdir(url, function(err) {});
52 if (fs.existsSync(manifestFilePath)) {
53 const jsonString = fs.readFileSync(manifestFilePath).toString();
[all …]
Duglify-source.js16 const fs = require('fs') constant
23 if (fs.existsSync(inputPath)) {
24 const files = fs.readdirSync(inputPath)
27 if (fs.existsSync(filePath)) {
28 const fileStat = fs.statSync(filePath)
30 const code = fs.readFileSync(filePath, 'utf-8')
43 fs.writeFileSync(outPath, uglifyCode)
Dmodule-source.js16 const fs = require('fs'); constant
23 fs.exists(dst, function(exists) {
27 fs.mkdir(dst, function() {
34 stat = fs.stat;
36 fs.readdir(src, function(err, paths){
53 readable = fs.createReadStream(_src);
54 writable = fs.createWriteStream(_dst);
Dnpm-install.js18 var fs = require("fs"); variable
22 if (!fs.existsSync(arkDir)) {
29 if (fs.existsSync(path.join(arkDir, "build-win"))) {
31 } else if (fs.existsSync(path.join(arkDir, "build-mac"))) {
33 } else if (!fs.existsSync(path.join(arkDir, "build"))) {
/developtools/ace_ets2bundle/compiler/
Duglify-source.js16 const fs = require('fs') constant
23 if (fs.existsSync(inputPath)) {
24 const files = fs.readdirSync(inputPath)
27 if (fs.existsSync(filePath)) {
28 const fileStat = fs.statSync(filePath)
30 const code = fs.readFileSync(filePath, 'utf-8')
43 fs.writeFileSync(outPath, uglifyCode)
Dnpm-install.js18 const fs = require('fs'); constant
22 if (!fs.existsSync(arkDir)) {
29 if (fs.existsSync(path.join(arkDir, "build-win"))) {
31 } else if (fs.existsSync(path.join(arkDir, "build-mac"))) {
33 } else if (!fs.existsSync(path.join(arkDir, "build"))) {
Dbuild_declarations_file.js18 const fs = require('fs') constant
40 if (fs.existsSync(globalTsFile)) {
43 if (fs.existsSync(featureAbilityPath)) {
47 if (!fs.existsSync(output)) {
65 let content = fs.readFileSync(item, 'utf8');
74 fs.writeFile(fileName, content, err => {
90 const files = fs.readdirSync(dir);
93 const status = fs.statSync(filePath);
104 if (!(fs.existsSync(parent) && !fs.statSync(parent).isFile())) {
107 fs.mkdirSync(filePath);
[all …]
/developtools/profiler/hidebug/test/unittest/js/
DExampleJsunit.test.js16 import fs from '@ohos.file.fs'
78 let data = fs.readTextSync(path);
108 let data = fs.readTextSync(path);
187 let file = fs.openSync(path, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
197 fs.closeSync(file);
213 let file = fs.openSync(path, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
223 fs.closeSync(file);
239 let file = fs.openSync(path, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
249 fs.closeSync(file);
/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/bundle/
Dbundle_mode.ts17 import fs from 'fs';
99 fs.writeFileSync(cacheOutputPath, rollupBundleSourceCode, 'utf-8');
100 if (!fs.existsSync(cacheOutputPath)) {
112 if (!fs.existsSync(this.hashJsonFilePath) || this.hashJsonFilePath.length === 0) {
121 jsonFile = fs.readFileSync(this.hashJsonFilePath).toString();
127 if (!fs.existsSync(cacheFilePath)) {
130 if (fs.existsSync(cacheAbcFilePath)) {
186 fs.writeFileSync(filesInfoPath, filesInfo, 'utf-8');
234 if (!(fs.existsSync(parentDir) && fs.statSync(parentDir).isDirectory())) {
242 const fileSize: any = fs.statSync(cacheFilePath).size;
[all …]
/developtools/ace_ets2bundle/compiler/src/
Dutils.ts18 import fs from 'fs';
225 const files: string[] = fs.readdirSync(dir);
228 const status: fs.Stats = fs.statSync(filePath);
244 fs.readdir(inputPath, function(err, files) {
251 const fileStat: fs.Stats = fs.statSync(inputFile);
264 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
267 if (fs.existsSync(outputFile)) {
270 const readStream: fs.ReadStream = fs.createReadStream(inputFile);
271 const writeStream: fs.WriteStream = fs.createWriteStream(outputFile);
283 if (!(fs.existsSync(parent) && !fs.statSync(parent).isFile())) {
[all …]
Ddo_arkTS_linter.ts16 import fs from 'fs';
108 if (!fs.existsSync(filePath)) {
112 if (!fs.existsSync(filePath)) {
113 fs.mkdirSync(filePath);
130 fs.writeFileSync(filePath, JSON.stringify(outputInfo, undefined, spaceNumBeforeJsonLine));
139 if (!fs.existsSync(filePath)) {
143 if (!fs.existsSync(filePath)) {
147 if (fs.existsSync(filePath)) {
148 fs.rmSync(filePath);
Dgen_abc_plugin.ts16 import * as fs from 'fs';
171 if (fs.existsSync(path.resolve(arkDir, 'build-win'))) {
174 if (fs.existsSync(path.resolve(arkDir, 'build-mac'))) {
177 if (!fs.existsSync(path.resolve(arkDir, 'build'))) {
198 fs.writeFile(cachePrebuildInfoPath, JSON.stringify(cachedJson, null, 2), 'utf-8',
218 fs.writeFile(cachePrebuildInfoPath, JSON.stringify(cachedJson, null, 2), 'utf-8',
436 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
440 fs.copyFileSync(filePath, tempFilePath);
469 if (!fs.existsSync(CACHED_SOURCEMAPS)) {
472 cachedSourceMaps = JSON.parse(fs.readFileSync(CACHED_SOURCEMAPS).toString());
[all …]
Dgen_aot.ts18 import * as fs from 'fs';
97 if (!fs.existsSync(appAbc)) {
110 if (!fs.existsSync(profile)) {
120 fs.closeSync(fs.openSync(appAot + '.an', 'w'));
121 fs.closeSync(fs.openSync(appAot + '.ai', 'w'));
149 if (fs.existsSync(builtinAbcPath)) {
/developtools/profiler/host/smartperf/ide/
Dbuild.js17 const fs = require('fs'); constant
60 if (fs.existsSync(from)) {
61 fs.writeFileSync(to, fs.readFileSync(from));
202 fs.mkdirSync(dest);
207 let directories = fs.readdirSync(src);
210 let fileSys = fs.statSync(filePath);
214 fs.copyFileSync(filePath, destPath);
222 return fs.existsSync(dirPath);
227 if (fs.existsSync(outPath)) {
228 files = fs.readdirSync(outPath);
[all …]
/developtools/smartperf_host/ide/
Dbuild.js17 const fs = require('fs'); constant
60 if (fs.existsSync(from)) {
61 fs.writeFileSync(to, fs.readFileSync(from));
202 fs.mkdirSync(dest);
207 let directories = fs.readdirSync(src);
210 let fileSys = fs.statSync(filePath);
214 fs.copyFileSync(filePath, destPath);
222 return fs.existsSync(dirPath);
227 if (fs.existsSync(outPath)) {
228 files = fs.readdirSync(outPath);
[all …]
/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/module/
Dmodule_mode.ts17 import fs from 'fs';
280 if (!fs.existsSync(this.cacheSourceMapPath)) {
285 this.cacheSourceMapObject = JSON.parse(fs.readFileSync(this.cacheSourceMapPath).toString());
317fs.writeFile(this.sourceMapPath, JSON.stringify(this.cacheSourceMapObject, null, 2), 'utf-8', (err…
321 fs.copyFileSync(this.sourceMapPath, this.cacheSourceMapPath);
353 fs.writeFileSync(this.filesInfoPath, filesInfo, 'utf-8');
361 fs.writeFileSync(this.npmEntriesInfoPath, entriesInfo, 'utf-8');
377 fs.writeFileSync(this.cacheFilePath, abcCacheFilesInfo, 'utf-8');
422 if (this.hashJsonFilePath.length === 0 || !fs.existsSync(this.hashJsonFilePath)) {
433 if (fs.existsSync(this.hashJsonFilePath)) {
[all …]
/developtools/ace_ets2bundle/compiler/src/fast_build/common/
Dprocess_project_config.ts15 import fs from 'fs';
60 if (fs.existsSync(sharePath)) {
72 if (fs.existsSync(projectConfig.manifestFilePath)) {
77 } else if (fs.existsSync(projectConfig.aceConfigPath)) {
84 if (appResource && fs.existsSync(appResource) && !projectConfig.xtsMode &&
/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/common/
Dprocess_ark_config.ts17 import fs from 'fs';
78 if (projectConfig.aceBuildJson && fs.existsSync(projectConfig.aceBuildJson)) {
79 const buildJsonInfo = JSON.parse(fs.readFileSync(projectConfig.aceBuildJson).toString());
104 if (projectConfig.aceManifestPath && fs.existsSync(projectConfig.aceManifestPath)) {
105 const manifestJsonInfo = JSON.parse(fs.readFileSync(projectConfig.aceManifestPath).toString());
110 if (projectConfig.aceModuleJsonPath && fs.existsSync(projectConfig.aceModuleJsonPath)) {
111 const moduleJsonInfo = JSON.parse(fs.readFileSync(projectConfig.aceModuleJsonPath).toString());
184 if (fs.existsSync(applyNameCache)) {
185 minifyOptions.nameCache = JSON.parse(fs.readFileSync(applyNameCache, 'utf-8'));
192 if (fs.existsSync(defaultNameCachePath)) {
[all …]
/developtools/hdc/src/common/
Dtransfer.cpp90 uv_fs_t *req = &ioContext->fs; in SimpleFileIO()
146 uv_fs_t fs; in SetFileTime() local
149 uv_fs_futime(nullptr, &fs, context->fsOpenReq.result, aTimeSec, mTimeSec, nullptr); in SetFileTime()
150 uv_fs_req_cleanup(&fs); in SetFileTime()
307 uv_fs_t fs = {}; in OnFileOpen() local
308 uv_fs_fstat(nullptr, &fs, context->fsOpenReq.result, nullptr); in OnFileOpen()
310 st.fileSize = fs.statbuf.st_size; in OnFileOpen()
313 … st.atime = fs.statbuf.st_atim.tv_sec * HDC_TIME_CONVERT_BASE + fs.statbuf.st_atim.tv_nsec; in OnFileOpen()
314 … st.mtime = fs.statbuf.st_mtim.tv_sec * HDC_TIME_CONVERT_BASE + fs.statbuf.st_mtim.tv_nsec; in OnFileOpen()
320 context->fileMode.perm = fs.statbuf.st_mode; in OnFileOpen()
[all …]
/developtools/ace_js2bundle/ace-loader/test/card/
Dtest.js18 const fs = require('fs'); constant
27 if(!fs.existsSync(filePath)){
30 const fileContent = fs.readFileSync(filePath, "utf-8");
37 if(!fs.existsSync(filePath)){
40 const expectedContent = fs.readFileSync(filePath, "utf-8");
/developtools/ace_ets2bundle/compiler/src/fast_build/visual/
Drollup-plugin-visual.ts1 import fs from 'fs';
46 if (!visualId || !fs.existsSync(visualId)) {
52 const stat: fs.Stats = fs.statSync(visualId);

123