Lines Matching refs:fs
16 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',
437 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
441 fs.copyFileSync(filePath, tempFilePath);
470 if (!fs.existsSync(CACHED_SOURCEMAPS)) {
473 cachedSourceMaps = JSON.parse(fs.readFileSync(CACHED_SOURCEMAPS).toString());
483 if (!fs.existsSync(CACHED_MODULELIST_FILE)) {
486 const data: Object = JSON.parse(fs.readFileSync(CACHED_MODULELIST_FILE).toString());
498 fs.writeFile(CACHED_MODULELIST_FILE, JSON.stringify(cachedJson, null, 2), 'utf-8',
505 fs.writeFile(CACHED_SOURCEMAPS, JSON.stringify(cachedSourceMaps, null, 2), 'utf-8',
518 fs.writeFile(sourceMapFilePath, JSON.stringify(cachedSourceMaps, null, 2), 'utf-8',
629 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
642 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
645 fs.writeFileSync(cacheOutputPath, inputString);
646 if (fs.existsSync(cacheOutputPath)) {
647 const fileSize: number = fs.statSync(cacheOutputPath).size;
666 if (!(fs.existsSync(parent) && !fs.statSync(parent).isFile())) {
669 fs.mkdirSync(path_);
876 if (fs.existsSync(hashFilePath)) {
877 jsonFile = fs.readFileSync(hashFilePath).toString();
883 if (!fs.existsSync(input)) {
888 if (fs.existsSync(outputPath)) {
910 if (!fs.existsSync(input) || !fs.existsSync(outputPath)) {
925 fs.writeFileSync(hashFilePath, JSON.stringify(moduleHashJsonObject));
941 if (fs.existsSync(hashFilePath)) {
942 jsonFile = fs.readFileSync(hashFilePath).toString();
948 if (!fs.existsSync(cacheOutputPath)) {
953 if (fs.existsSync(cacheAbcFilePath)) {
975 if (!fs.existsSync(cacheOutputPath) || !fs.existsSync(cacheAbcFilePath)) {
989 fs.writeFileSync(hashFilePath, JSON.stringify(hashJsonObject));
995 … if (!fs.existsSync(process.env.cachePath) || !fs.statSync(process.env.cachePath).isDirectory()) {
1008 if (!fs.existsSync(hashPath) || !fs.statSync(hashPath).isDirectory()) {
1031 if (!(fs.existsSync(nodeModulesPath) && fs.statSync(nodeModulesPath).isDirectory())) {
1046 if (!fs.existsSync(cacheAbcFilePath)) {
1052 if (!(fs.existsSync(parent) && fs.statSync(parent).isDirectory())) {
1057 fs.copyFileSync(cacheAbcFilePath, abcFile);
1059 if (process.env.cachePath === undefined && fs.existsSync(cacheOutputPath)) {
1060 fs.unlinkSync(cacheOutputPath);
1079 if (!fs.existsSync(projectConfig.changedFileList)) {
1084 let changedFileListJson: string = fs.readFileSync(projectConfig.changedFileList).toString();
1136 if (!fs.existsSync(projectConfig.patchAbcPath)) {
1147 fs.writeFileSync(sourceMapFilePath,
1182 fs.writeFileSync(protoFilePath, entriesInfo, 'utf-8');
1266 fs.writeFileSync(filesInfoPath, filesInfo, 'utf-8');