| /ide/tools/previewer/automock/mock-generate/ |
| H A D | build.js | 18 const path = require('path'); 21 const mockJsPath = path.join(__dirname, '..', './runtime/main/extend/systemplugin'); 27 ${path.join(__dirname, '..', nodeDir)} ${path.join(__dirname, '..', './node_modules/typescript/bin/tsc')} && 28 ${path.join(__dirname, '..', nodeDir)} ${path.join(__dirname, 'dist')}/main.js ${apiInputPath} && 29 ${path.join(__dirname, '..', nodeDir)} ${path.join(__dirname, '..', './node_modules/eslint/bin/eslint.js')}
|
| /ide/tools/previewer/util/ |
| H A D | FileSystem.cpp | 34 bool FileSystem::IsFileExists(std::string path) in IsFileExists() argument 36 return S_ISREG(GetFileMode(path)); in IsFileExists() 39 bool FileSystem::IsDirectoryExists(std::string path) in IsDirectoryExists() argument 41 return S_ISDIR(GetFileMode(path)); in IsDirectoryExists() 48 ELOG("Get current path failed."); in GetApplicationPath() 51 std::string path(appPath); in GetApplicationPath() 52 return path; in GetApplicationPath() 64 ELOG("Application path is not exists."); in MakeVirtualFileSystemPath() 67 for (std::string path : pathList) { in MakeVirtualFileSystemPath() 69 dirToMake += path; in MakeVirtualFileSystemPath() 78 MakeDir(std::string path) MakeDir() argument 94 GetFileMode(std::string path) GetFileMode() argument 113 NormalizePath(const std::string& path) NormalizePath() argument [all...] |
| H A D | FileSystem.h | 24 static bool IsFileExists(std::string path); 25 static bool IsDirectoryExists(std::string path); 29 static int MakeDir(std::string path); 33 static std::string NormalizePath(const std::string& path); 39 static unsigned short GetFileMode(std::string path);
|
| H A D | CommandParser.cpp | 62 Register("-f", 1, "config path <path>"); in CommandParser() 83 Register("-pages", 1, "Set project's router config file path."); in CommandParser() 84 Register("-hsp", 1, "Set container sdk path."); in CommandParser() 92 Register("-ljPath", 1, "Set loader.json path for Previewer"); in CommandParser() 324 errorInfo = std::string("No app path specified."); in IsAppPathValid() 328 std::string path = Value("j"); in IsAppPathValid() local 329 if (!FileSystem::IsDirectoryExists(path)) { in IsAppPathValid() 330 errorInfo = std::string("Js app path not exist."); in IsAppPathValid() 458 std::string path in IsConfigPathValid() local 474 std::string path = Value("arp"); IsAppResourcePathValid() local 756 std::string path = Value("hsp"); IsContainerSdkPathValid() local 848 std::string path = Value("abp"); IsAbilityPathValid() local 990 std::string path = Value("ljPath"); IsLoaderJsonPathValid() local [all...] |
| H A D | JsonReader.h | 124 static std::string ReadFile(const std::string& path);
|
| H A D | JsonReader.cpp | 627 std::string JsonReader::ReadFile(const std::string& path) in ReadFile() argument 629 std::ifstream inFile(path); in ReadFile()
|
| /ide/tools/previewer/automock/ |
| H A D | build_jsmock_system_plugin.js | 18 const path = require('path'); 51 tsconfig: path.resolve(__dirname, 'tsconfig.json'), 61 input: path.resolve(__dirname, 'runtime/main/extend/systemplugin/index.js'), 76 file: path.resolve(__dirname, 'dist/jsMockSystemPlugin.js'), 91 const file = path.relative(__dirname, filePath);
|
| /ide/tools/previewer/util/windows/ |
| H A D | NativeFileSystem.cpp | 27 std::wstring path = std::wstring(parentFolderPath.begin(), parentFolderPath.end()); in FindSubfolderByName() local 28 std::wstring searchPath = path + L"\\*"; in FindSubfolderByName()
|
| /ide/tools/previewer/test/mock/ |
| H A D | MockFile.cpp | 127 std::string relativePath = entry.path().string().substr(folderPath.length() + 1); // Relative path in AddFolderToZip() 133 std::cerr << "Failed to create entry in zip file for " << entry.path() << std::endl; in AddFolderToZip() 139 if (!AddFileToZip(zip, entry.path().string(), entryName + "/" + relativePath)) { in AddFolderToZip() 160 if (!AddFolderToZip(zip, file, fs::path(file).filename())) { in CompressFiles() 166 if (!AddFileToZip(zip, file, fs::path(file).filename())) { in CompressFiles() 196 std::filesystem::path dir("ets"); in CreateFiles()
|
| /ide/tools/previewer/test/unittest/jsapp_lite/ |
| H A D | JsAppImplTest.cpp | 34 static void CopyFileToDirectory(const std::filesystem::path& sourceFile, in CopyFileToDirectory() 35 const std::filesystem::path& destDirectory) in CopyFileToDirectory() 42 std::filesystem::path destFile = destDirectory / sourceFile.filename(); in CopyFileToDirectory()
|
| /ide/tools/previewer/test/mock_lite/ui_lite/ |
| H A D | MockUIFont.cpp | 60 int8_t UIFont::SetFontPath(const char* path, BaseFont::FontType type) in SetFontPath() argument
|
| H A D | MockUIFontVector.cpp | 111 int8_t UIFontVector::SetFontPath(const char* path, FontType type) in SetFontPath() argument
|
| /ide/tools/previewer/jsapp/rich/external/ |
| H A D | StageContext.cpp | 220 ILOG("get modules.abc path: %s successed.", abcPath.c_str()); in GetLocalModuleBuffer() 423 bool StageContext::ContainsRelativePath(const std::string& path) const in ContainsRelativePath() 427 return (path.find(flg1) != std::string::npos || path.find(flg2) != std::string::npos); in ContainsRelativePath() 451 int StageContext::GetUpwardDirIndex(const std::string& path, const int upwardLevel) const in GetUpwardDirIndex() argument 453 std::string::size_type pos = path.find_last_of(FileSystem::GetSeparator().c_str()); in GetUpwardDirIndex() 461 pos = path.find_last_of(FileSystem::GetSeparator().c_str(), pos - 1); in GetUpwardDirIndex() 464 ILOG("GetUpwardDir path:%s pos:%d", path.c_str(), pos); in GetUpwardDirIndex() 536 const std::string path in SetPkgContextInfo() local [all...] |
| H A D | StageContext.h | 51 bool ContainsRelativePath(const std::string& path) const; 68 int GetUpwardDirIndex(const std::string& path, const int upwardLevel) const;
|
| /ide/tools/previewer/cli/ |
| H A D | CommandLineInterface.h | 40 void ReadAndApplyConfig(std::string path) const;
|
| H A D | CommandLineInterface.cpp | 245 void CommandLineInterface::ReadAndApplyConfig(std::string path) const in ReadAndApplyConfig() 247 if (path.empty()) { in ReadAndApplyConfig() 250 std::string jsonStr = JsonReader::ReadFile(path); in ReadAndApplyConfig()
|
| /ide/tools/previewer/test/unittest/jsapp/ |
| H A D | StageContextTest.cpp | 361 std::string path = "/aaa/bbb/ccc/ddd/eee/fff.json"; in TEST_F() local 362 int pos = OHOS::Ide::StageContext::GetInstance().GetUpwardDirIndex(path, 3); in TEST_F() 404 std::string path = "/aaa/bbb/ccc/ddd/eee/fff.json"; in TEST_F() local 405 std::vector<uint8_t>* ret = OHOS::Ide::StageContext::GetInstance().GetModuleBufferFromHsp(path, "aa"); in TEST_F() 421 std::string path = "/aaa/bbb/ccc/ddd/eee/fff.json"; in TEST_F() local 422 std::vector<uint8_t>* ret = OHOS::Ide::StageContext::GetInstance().GetSystemModuleBuffer(path, "aa"); in TEST_F()
|
| /ide/tools/previewer/test/unittest/util/ |
| H A D | JsonReaderTest.cpp | 412 std::string path = "1.json"; in TEST() local 413 std::ofstream file(path); in TEST() 415 printf("Error creating file: %s\r\n", path.c_str()); in TEST() 421 std::string readStr = JsonReader::ReadFile(path); in TEST()
|
| /ide/tools/previewer/jsapp/rich/ |
| H A D | JsAppImpl.cpp | 285 DLOG("Get module buffer, input path: %{public}s.", inputPath.c_str()); in RunDebugAbility() 288 ELOG("Get module buffer failed, input path: %{public}s.", inputPath.c_str()); in RunDebugAbility() 319 const std::string path = commandInfo.appResourcePath + FileSystem::GetSeparator() + "module.json"; in SetSimulatorParams() local 320 if (!FileSystem::IsFileExists(path)) { in SetSimulatorParams() 324 std::optional<std::vector<uint8_t>> ctx = OHOS::Ide::StageContext::GetInstance().ReadFileContents(path); in SetSimulatorParams()
|