/ohos5.0/foundation/ability/ability_runtime/frameworks/native/ability/native/photo_editor_extension_ability/ |
H A D | photo_editor_extension_context.cpp | 121 std::ifstream sourceFile; in CopyImageToPanel() local 122 sourceFile.open(imagePath, std::ios::binary); in CopyImageToPanel() 123 if (!sourceFile.is_open()) { in CopyImageToPanel() 125 sourceFile.close(); in CopyImageToPanel() 129 sourceFile.seekg(0, sourceFile.end); in CopyImageToPanel() 130 std::streampos imageSize = sourceFile.tellg(); in CopyImageToPanel() 133 sourceFile.close(); in CopyImageToPanel() 136 sourceFile.seekg(0, sourceFile.beg); in CopyImageToPanel() 142 sourceFile.close(); in CopyImageToPanel() 150 panelFile.write(buffer, sourceFile.gcount()); in CopyImageToPanel() [all …]
|
/ohos5.0/foundation/filemanagement/user_file_service/test/unittest/ |
H A D | file_access_ext_stub_impl_test.cpp | 223 Uri sourceFile(""); variable 248 Uri sourceFile(""); variable 271 Uri sourceFile(""); variable 298 Uri sourceFile(""); variable 323 Uri sourceFile(""); variable 350 Uri sourceFile(""); variable 375 Uri sourceFile(""); variable 403 Uri sourceFile(""); variable 429 Uri sourceFile(""); variable 456 Uri sourceFile(""); variable [all …]
|
/ohos5.0/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/ |
H A D | package_file.cpp | 158 sourceFile.read(buffer.data(), readLen); in FileContentCopy() 159 if (!sourceFile.good()) { in FileContentCopy() 232 if (!sourceFile.good()) { in UnpackFileHeader() 307 static int UnpackFileContext(ifstream &sourceFile, FileContext &fileContext) in UnpackFileContext() argument 310 sourceFile.read(reinterpret_cast<char *>(buffer.data()), buffer.size()); in UnpackFileContext() 311 if (!sourceFile.good()) { in UnpackFileContext() 378 int errCode = FileContentCopy(sourceFile, file, fileContext.fileLen); in UnpackFileContent() 416 int errCode = OS::GetFilePermissions(sourceFile, permissions); in CopyFilePermissions() 445 ifstream sourceHandle(sourceFile, ios::in | ios::binary); in GetPackageVersion() 530 ifstream sourceHandle(sourceFile, ios::in | ios::binary); in UnpackFile() [all …]
|
H A D | package_file.h | 31 …static int UnpackFile(const std::string &sourceFile, const std::string &targetPath, FileInfo &file… 32 static int GetPackageVersion(const std::string &sourceFile, uint32_t &version);
|
/ohos5.0/foundation/filemanagement/user_file_service/interfaces/inner_api/file_access/src/ |
H A D | file_access_ext_stub_impl.cpp | 72 int FileAccessExtStubImpl::Delete(const Uri &sourceFile) in Delete() argument 81 int ret = extension_->Delete(sourceFile); in Delete() 85 int FileAccessExtStubImpl::Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile) in Move() argument 94 int ret = extension_->Move(sourceFile, targetParent, newFile); in Move() 124 int FileAccessExtStubImpl::Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFi… in Rename() argument 133 int ret = extension_->Rename(sourceFile, displayName, newFile); in Rename() 286 int FileAccessExtStubImpl::MoveItem(const Uri &sourceFile, const Uri &targetParent, std::vector<Res… in MoveItem() argument 296 return extension_->MoveItem(sourceFile, targetParent, moveResult, force); in MoveItem() 299 int FileAccessExtStubImpl::MoveFile(const Uri &sourceFile, const Uri &targetParent, std::string &fi… in MoveFile() argument 308 return extension_->MoveFile(sourceFile, targetParent, fileName, newFile); in MoveFile()
|
H A D | file_access_helper.cpp | 505 Uri sourceFileUri(sourceFile.ToString()); in Move() 507 if (!CheckUri(sourceFile) || !CheckUri(targetParent)) { in Move() 707 if (!CheckUri(sourceFile)) { in Rename() 737 Uri sourceFile(fileInfo.uri); in ListFile() local 738 if (!CheckUri(sourceFile)) { in ListFile() 768 Uri sourceFile(fileInfo.uri); in ScanFile() local 769 if (!CheckUri(sourceFile)) { in ScanFile() 1128 Uri sourceFileUri(sourceFile.ToString()); in MoveItem() 1130 if (!CheckUri(sourceFile) || !CheckUri(targetParent)) { in MoveItem() 1164 Uri sourceFileUri(sourceFile.ToString()); in MoveFile() [all …]
|
H A D | file_access_ext_stub.cpp | 227 std::shared_ptr<Uri> sourceFile(data.ReadParcelable<Uri>()); in CmdMove() local 228 if (sourceFile == nullptr) { in CmdMove() 241 int ret = Move(*sourceFile, *targetParent, newFileUri); in CmdMove() 342 if (sourceFile == nullptr) { in CmdRename() 360 int ret = Rename(*sourceFile, displayName, newFileUri); in CmdRename() 723 std::string sourceFile; in CmdMoveItem() local 724 if (!data.ReadString(sourceFile)) { in CmdMoveItem() 742 Uri source(sourceFile); in CmdMoveItem() 769 std::string sourceFile; in CmdMoveFile() local 770 if (!data.ReadString(sourceFile)) { in CmdMoveFile() [all …]
|
H A D | file_access_ext_ability.cpp | 82 int FileAccessExtAbility::Delete(const Uri &sourceFile) in Delete() argument 88 int FileAccessExtAbility::Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile) in Move() argument 107 int FileAccessExtAbility::Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFil… in Rename() argument
|
H A D | file_access_ext_proxy.cpp | 189 int FileAccessExtProxy::Delete(const Uri &sourceFile) in Delete() argument 199 if (!data.WriteParcelable(&sourceFile)) { in Delete() 226 int FileAccessExtProxy::Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile) in Move() argument 236 if (!data.WriteParcelable(&sourceFile)) { in Move() 436 int FileAccessExtProxy::Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFile) in Rename() argument 446 if (!data.WriteParcelable(&sourceFile)) { in Rename() 1025 int FileAccessExtProxy::MoveItem(const Uri &sourceFile, const Uri &targetParent, std::vector<Result… in MoveItem() argument 1036 std::string insideInputSourceUri = sourceFile.ToString(); in MoveItem() 1070 int FileAccessExtProxy::MoveFile(const Uri &sourceFile, const Uri &targetParent, std::string &fileN… in MoveFile() argument 1080 std::string insideInputSourceUri = sourceFile.ToString(); in MoveFile()
|
/ohos5.0/foundation/filemanagement/user_file_service/interfaces/inner_api/file_access/include/ |
H A D | file_access_ext_stub_impl.h | 40 int Delete(const Uri &sourceFile) override; 41 int Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile) override; 46 int Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFile) override; 58 int MoveItem(const Uri &sourceFile, const Uri &targetParent, std::vector<Result> &moveResult, 60 …int MoveFile(const Uri &sourceFile, const Uri &targetParent, std::string &fileName, Uri &newFile) …
|
H A D | ifile_access_ext_base.h | 62 virtual int Delete(const Uri &sourceFile) = 0; 63 virtual int Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile) = 0; 68 virtual int Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFile) = 0; 80 …virtual int MoveItem(const Uri &sourceFile, const Uri &targetParent, std::vector<Result> &moveResu… 82 …virtual int MoveFile(const Uri &sourceFile, const Uri &targetParent, std::string &fileName, Uri &n…
|
H A D | file_access_ext_proxy.h | 42 virtual int Delete(const Uri &sourceFile) override; 43 virtual int Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile) override; 48 … virtual int Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFile) override; 60 …virtual int MoveItem(const Uri &sourceFile, const Uri &targetParent, std::vector<Result> &moveResu… 62 …virtual int MoveFile(const Uri &sourceFile, const Uri &targetParent, std::string &fileName, Uri &n…
|
H A D | file_access_ext_ability.h | 47 virtual int Delete(const Uri &sourceFile); 48 virtual int Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile); 51 virtual int Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFile); 64 …virtual int MoveItem(const Uri &sourceFile, const Uri &targetParent, std::vector<Result> &moveResu… 66 …virtual int MoveFile(const Uri &sourceFile, const Uri &targetParent, std::string &fileName, Uri &n…
|
H A D | file_access_helper.h | 76 int Move(Uri &sourceFile, Uri &targetParent, Uri &newFile); 79 int Rename(Uri &sourceFile, const std::string &displayName, Uri &newFile); 90 int MoveItem(Uri &sourceFile, Uri &targetParent, std::vector<Result> &moveResult, bool force); 91 int MoveFile(Uri &sourceFile, Uri &targetParent, std::string &fileName, Uri &newFile);
|
H A D | js_file_access_ext_ability.h | 87 int Delete(const Uri &sourceFile) override; 88 int Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile) override; 92 int Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFile) override; 104 int MoveItem(const Uri &sourceFile, const Uri &targetParent, std::vector<Result> &moveResult, 106 …int MoveFile(const Uri &sourceFile, const Uri &targetParent, std::string &fileName, Uri &newFile) …
|
/ohos5.0/foundation/filemanagement/user_file_service/test/unittest/mock/ |
H A D | file_access_ext_ability_mock.h | 35 MOCK_METHOD1(Delete, int(const Uri &sourceFile)); 36 MOCK_METHOD3(Move, int(const Uri &sourceFile, const Uri &targetParent, Uri &newFile)); 39 MOCK_METHOD3(Rename, int(const Uri &sourceFile, const std::string &displayName, Uri &newFile)); 52 …MOCK_METHOD4(MoveItem, int(const Uri &sourceFile, const Uri &targetParent, std::vector<Result> &mo… 54 …MOCK_METHOD4(MoveFile, int(const Uri &sourceFile, const Uri &targetParent, std::string &fileName, …
|
/ohos5.0/foundation/filemanagement/user_file_service/test/fuzztest/fileaccessextstub_fuzzer/ |
H A D | fileaccessextabilitymock.h | 36 int Delete(const Uri &sourceFile) override { return 0; }; in Delete() argument 37 int Move(const Uri &sourceFile, const Uri &targetParent, Uri &newFile) override { return 0; }; in Move() argument 42 …int Rename(const Uri &sourceFile, const std::string &displayName, Uri &newFile) override { return … in Rename() argument 55 int MoveItem(const Uri &sourceFile, const Uri &targetParent, std::vector<Result> &moveResult, 57 …int MoveFile(const Uri &sourceFile, const Uri &targetParent, std::string &fileName, Uri &newFile) … in MoveFile() argument
|
/ohos5.0/base/hiviewdfx/hiview/utility/smart_parser/rule/ |
H A D | extract_rule.cpp | 157 bool ExtractRule::IsMatchPath(const string& sourceFile, const string& name, const string& pattern, in IsMatchPath() argument 161 sourceFile.c_str(), name.c_str(), pattern.c_str()); in IsMatchPath() 162 desPath = sourceFile; in IsMatchPath() 164 if (LogUtil::IsTestModel(sourceFile, name, pattern, desPath)) { in IsMatchPath() 182 if (regex_match(sourceFile, regex(out + part))) { in IsMatchPath() 183 out = ((*(sourceFile.rbegin())) == '/') ? sourceFile : (sourceFile + "/"); in IsMatchPath()
|
/ohos5.0/drivers/hdf_core/framework/tools/hdi-gen/util/ |
H A D | options.cpp | 158 void Options::AddSources(const std::string &sourceFile) in AddSources() argument 160 std::string realPath = File::AdapterRealPath(sourceFile); in AddSources() 162 Logger::E(TAG, "invalid idl file path:%s", sourceFile.c_str()); in AddSources() 172 Logger::E(TAG, "this idl file has been add:%s", sourceFile.c_str()); in AddSources() 178 std::string Options::CheckOutPutFile(const std::string &sourceFile) in CheckOutPutFile() argument 180 std::string realPath = File::AdapterRealPath(sourceFile); in CheckOutPutFile() 182 Logger::E(TAG, "invalid idl file path:%s", sourceFile.c_str()); in CheckOutPutFile()
|
/ohos5.0/base/theme/wallpaper_mgr/utils/src/ |
H A D | file_deal.cpp | 59 bool FileDeal::CopyFile(const std::string &sourceFile, const std::string &newFile) in CopyFile() argument 62 std::filesystem::path srcPath(sourceFile); in CopyFile() 74 bool FileDeal::DeleteFile(const std::string &sourceFile) in DeleteFile() argument 76 if (!IsFileExist(sourceFile)) { in DeleteFile() 79 if (remove(sourceFile.c_str()) < 0) { in DeleteFile()
|
/ohos5.0/base/hiviewdfx/hiview/adapter/service/server/src/ |
H A D | hiview_service_ability.cpp | 225 std::string sourceFile = configInfoPtr->path + logName; in CopyOrMoveFile() local 226 if (!FileUtil::FileExists(sourceFile)) { in CopyOrMoveFile() 231 return isMove ? service->Move(sourceFile, fullPath) : service->Copy(sourceFile, fullPath); in CopyOrMoveFile() 250 std::string sourceFile = configInfoPtr->path + logName; in Remove() local 251 if (!FileUtil::FileExists(sourceFile)) { in Remove() 255 return service->Remove(sourceFile); in Remove()
|
/ohos5.0/foundation/bundlemanager/bundle_framework/test/fuzztest/fuzztest_others/copyfiles_fuzzer/ |
H A D | copyfiles_fuzzer.cpp | 30 std::string sourceFile (reinterpret_cast<const char*>(data), size); in DoSomethingInterestingWithMyAPI() 31 sourceFiles.push_back(sourceFile); in DoSomethingInterestingWithMyAPI()
|
/ohos5.0/base/theme/wallpaper_mgr/utils/include/ |
H A D | file_deal.h | 30 static bool CopyFile(const std::string &sourceFile, const std::string &newFile); 31 static bool DeleteFile(const std::string &sourceFile);
|
/ohos5.0/foundation/ability/idl_tool/idl_tool_2/preprocessor/ |
H A D | preprocessor.cpp | 78 for (const auto &sourceFile : sourceFiles) { in UnitPreprocess() local 80 if (!ParseFileDetail(sourceFile, info)) { in UnitPreprocess() 128 bool Preprocessor::ParseFileDetail(const std::string &sourceFile, FileDetail &info) in ParseFileDetail() argument 131 if (!lexer.Reset(sourceFile)) { in ParseFileDetail() 132 Logger::E(TAG, "failed to open file '%s'.", sourceFile.c_str()); in ParseFileDetail()
|
/ohos5.0/drivers/hdf_core/framework/tools/hdi-gen/preprocessor/ |
H A D | preprocessor.cpp | 71 for (const auto &sourceFile : sourceFiles) { in UnitPreprocess() local 73 if (!ParseFileDetail(sourceFile, info)) { in UnitPreprocess() 121 bool Preprocessor::ParseFileDetail(const std::string &sourceFile, FileDetail &info) in ParseFileDetail() argument 124 if (!lexer.Reset(sourceFile)) { in ParseFileDetail() 125 Logger::E(TAG, "failed to open file '%s'.", sourceFile.c_str()); in ParseFileDetail()
|