| /foundation/ai/intelligent_voice_framework/llt/hdt/depend_libs/src/ |
| D | file_ex.cpp | 4 * you may not use this file except in compliance with the License. 38 ifstream file(filePath.c_str()); in LoadStringFromFile() local 39 if (!file.is_open()) { in LoadStringFromFile() 40 UTILS_LOGD("open file failed! filePath:%{public}s", filePath.c_str()); in LoadStringFromFile() 44 file.seekg(0, ios::end); in LoadStringFromFile() 45 int fileLength = file.tellg(); in LoadStringFromFile() 47 UTILS_LOGD("invalid file length(%{public}d)", fileLength); in LoadStringFromFile() 52 file.seekg(0, ios::beg); in LoadStringFromFile() 53 copy(istreambuf_iterator<char>(file), istreambuf_iterator<char>(), back_inserter(content)); in LoadStringFromFile() 79 UTILS_LOGD("LoadStringFromFd get file name by fd failed!"); in LoadStringFromFdToFile() [all …]
|
| /foundation/distributeddatamgr/udmf/framework/jskitsimpl/data/ |
| D | file_napi.cpp | 4 * you may not use this file except in compliance with the License. 18 #include "file.h" 27 /* File extends UnifiedRecord */ in Constructor() 30 /* File properties */ in Constructor() 35 return NapiDataUtils::DefineClass(env, "File", properties, count, FileNapi::New); in Constructor() 45 auto *file = new (std::nothrow) FileNapi(); in New() local 46 ASSERT_ERR(ctxt->env, file != nullptr, Status::E_ERROR, "no memory for file!"); in New() 47 file->value_ = std::make_shared<File>(); in New() 48 ASSERT_CALL(env, napi_wrap(env, ctxt->self, file, Destructor, nullptr, nullptr), file); in New() 56 auto *file = new (std::nothrow) FileNapi(); in NewInstance() local [all …]
|
| /foundation/arkui/ace_engine/frameworks/core/image/test/unittest/ |
| D | image_provider_test_utils.h | 4 * you may not use this file except in compliance with the License. 31 const std::string FILE_GIF = "file:///data/test/resource/imageprovider/images/unbroken.gif"; 32 const std::string FILE_GIF_BROKEN = "file:///data/test/resource/imageprovider/images/broken.gif"; 34 const std::string FILE_JPG = "file:///data/test/resource/imageprovider/images/unbroken.jpg"; 35 const std::string FILE_JPG_BROKEN = "file:///data/test/resource/imageprovider/images/broken.jpg"; 37 const std::string FILE_PNG = "file:///data/test/resource/imageprovider/images/unbroken.png"; 38 const std::string FILE_PNG_BROKEN = "file:///data/test/resource/imageprovider/images/broken.png"; 40 const std::string FILE_WEBP = "file:///data/test/resource/imageprovider/images/unbroken.webp"; 41 const std::string FILE_WEBP_BROKEN = "file:///data/test/resource/imageprovider/images/broken.webp"; 43 const std::string FILE_BMP = "file:///data/test/resource/imageprovider/images/unbroken.bmp"; [all …]
|
| /foundation/multimedia/image_framework/frameworks/innerkitsimpl/accessor/include/ |
| D | file_metadata_stream.h | 4 * you may not use this file except in compliance with the License. 38 * properly handled during file read/write errors. 48 * @param file Pointer to a FILE object that specifies an output stream. 51 virtual ssize_t FWrite(const void *src, size_t size, ssize_t nmemb, FILE *file); 58 * @param file Pointer to a FILE object that specifies an input stream. 61 virtual ssize_t FRead(void *destv, size_t size, ssize_t nmemb, FILE *file); 66 * @brief A class that represents a file-based image stream. 73 * @brief Constructs a new FileMetadataStream object from a file descriptor. 74 * @param fileDescriptor The file descriptor. 79 * @brief Constructs a new FileMetadataStream object from a file path. [all …]
|
| /foundation/graphic/graphic_2d/rosen/modules/render_service_profiler/ |
| D | rs_profiler_utils.cpp | 4 * you may not use this file except in compliance with the License. 241 // File system routines 252 std::string Utils::MakePath(const std::string& directory, const std::string& file) in MakePath() argument 254 return NormalizePath(directory) + file; in MakePath() 346 std::ifstream file(realPath); in LoadLine() local 347 if (file) { in LoadLine() 348 std::getline(file, line); in LoadLine() 361 std::ifstream file(realPath); in LoadLines() local 362 if (file) { in LoadLines() 364 while (std::getline(file, line)) { in LoadLines() [all …]
|
| D | rs_profiler_utils.h | 4 * you may not use this file except in compliance with the License. 91 // File system routines 93 static std::string MakePath(const std::string& directory, const std::string& file); 104 static FILE* FileOpen(const std::string& path, const std::string& options); 105 static void FileClose(FILE* file); 106 static bool IsFileValid(FILE* file); 107 static size_t FileSize(FILE* file); 108 static size_t FileTell(FILE* file); 109 static void FileSeek(FILE* file, int64_t offset, int32_t origin); 110 static void FileRead(FILE* file, void* data, size_t size); [all …]
|
| /foundation/filemanagement/file_api/interfaces/kits/rust/include/ |
| D | rust_file.h | 4 * you may not use this file except in compliance with the License. 27 * @brief Enumeration of `lseek` interface to seek within a file. 28 * @param Start Sets the offset from the head of the file. 30 * @param End Sets the offset from th tail of the file. 61 * @brief Gets a iterator to read the content of a file in a path and split it by line. 62 * @param path file path. 63 * @retval NULL Fails to read the file, stores error information from errno. 64 * @retval !NULL Reads the file successfully, valid reader iterator pointer. 69 * @li rust_file.h:The file where the interface is located. 77 * @li rust_file.h:The file where the interface is located. [all …]
|
| /foundation/graphic/graphic_3d/lume/LumeEngine/api/core/io/ |
| D | intf_file_manager.h | 4 * you may not use this file except in compliance with the License. 35 * File Manager. in CORE_BEGIN_NAMESPACE() 36 * Provides basic file I/O across different file systems and protocols. in CORE_BEGIN_NAMESPACE() 45 * @param uri Absolute uri, such as '%file://logs/log.txt' in CORE_BEGIN_NAMESPACE() 50 /** Opens file in given uri. in CORE_BEGIN_NAMESPACE() 51 * @param uri The complete file uri, such as '%file://images/texture.png' in CORE_BEGIN_NAMESPACE() 52 * @return Read-only file that was opened, empty ptr if file cannot be opened. in CORE_BEGIN_NAMESPACE() 56 /** Creates a new file to given uri. in CORE_BEGIN_NAMESPACE() 57 * @param uri The complete file uri, such as '%file://logs/log.txt' in CORE_BEGIN_NAMESPACE() 58 * @return File that was created, empty ptr if file cannot be created. in CORE_BEGIN_NAMESPACE() [all …]
|
| /foundation/multimedia/ringtone_library/ |
| D | OAT.xml | 5 you may not use this file except in compliance with the License. 16 …This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your pro… 38 desc="Ringtone library file, and this file does not support comments"/> 40 desc="Ringtone library file, and this file does not support comments"/> 42 desc="Ringtone library file, and this file does not support comments"/> 44 desc="Ringtone library file, and this file does not support comments"/> 46 desc="Ringtone library file, and this file does not support comments"/> 50 desc="Ringtone library file, and this file does not support comments"/> 52 desc="Ringtone library file, and this file does not support comments"/> 54 desc="Ringtone library file, and this file does not support comments"/> [all …]
|
| /foundation/distributeddatamgr/udmf/framework/innerkitsimpl/data/ |
| D | file.cpp | 4 * you may not use this file except in compliance with the License. 16 #include "file.h" 20 File::File() : UnifiedRecord(FILE) in File() function in OHOS::UDMF::File 24 File::File(const std::string &uri) : UnifiedRecord(FILE) in File() function in OHOS::UDMF::File 29 File::File(UDType type, ValueType value) : UnifiedRecord(type, value) in File() function in OHOS::UDMF::File 31 this->dataType_ = FILE; in File() 46 int64_t File::GetSize() in GetSize() 51 std::string File::GetUri() const in GetUri() 56 void File::SetUri(const std::string &uri) in SetUri() 65 std::string File::GetRemoteUri() const in GetRemoteUri() [all …]
|
| D | unified_data_helper.cpp | 4 * you may not use this file except in compliance with the License. 25 #include "file.h" 66 if (records[0] == nullptr || records[0]->GetType() != UDType::FILE) { in IsTempUData() 69 auto file = static_cast<File*>(records[0].get()); in IsTempUData() local 70 if (file == nullptr) { in IsTempUData() 71 LOG_ERROR(UDMF_FRAMEWORK, "Invalid file record!"); in IsTempUData() 74 auto details = file->GetDetails(); in IsTempUData() 125 LOG_ERROR(UDMF_FRAMEWORK, "fail to save unified data to file"); in Pack() 129 auto fileRecord = std::make_shared<File>(uri); in Pack() 149 auto file = static_cast<File*>(records[0].get()); in Unpack() local [all …]
|
| /foundation/multimedia/av_codec/test/moduletest/demuxer/src/ |
| D | func2_test.cpp | 4 * you may not use this file except in compliance with the License. 123 * @tc.name : create vtt demuxer with file and read 132 const char *file = "/data/test/media/webvtt_test.vtt"; variable 133 int fd = open(file, O_RDONLY); 134 int64_t size = GetFileSize(file); 135 cout << file << "----------------------" << fd << "---------" << size << endl; 170 * @tc.name : create vtt demuxer with file and forward back seek+read 180 const char *file = "/data/test/media/webvtt_test.vtt"; variable 181 int fd = open(file, O_RDONLY); 182 int64_t size = GetFileSize(file); [all …]
|
| D | func_test.cpp | 4 * you may not use this file except in compliance with the License. 200 const char *file = "/data/media/noPermission.mp4"; variable 201 int fd = open(file, O_RDONLY); 202 int64_t size = GetFileSize(file); 203 cout << file << "----------------------" << fd << "---------" << size << endl; 204 cout << file << "------" << size << endl; 219 const char *file = "/data/test/media/invalid.mp4"; variable 220 int fd = open(file, O_RDONLY); 221 int64_t size = GetFileSize(file); 222 cout << file << "----------------------" << fd << "---------" << size << endl; [all …]
|
| /foundation/filemanagement/app_file_service/frameworks/native/backup_ext/include/ |
| D | untar_file.h | 4 * you may not use this file except in compliance with the License. 55 * @brief parse tar file 62 * @brief parse incremental tar file 99 * @brief creat a file 103 FILE *CreateFile(std::string &path); 106 * @brief parse regular file 123 * @brief parse file by typeFlag 131 * @brief parse incremental file by typeFlag 146 * @param info file state info 151 * @brief deal parse tar file result [all …]
|
| /foundation/ability/idl_tool/metadata/ |
| D | metadata_reader.cpp | 4 * you may not use this file except in compliance with the License. 20 #include "util/file.h" 29 File file(filePath, File::READ); in ReadMetadataFromFile() local 30 if (!file.IsValid()) { in ReadMetadataFromFile() 31 Logger::E(tag, "Open \"%s\" file failed.", filePath.string()); in ReadMetadataFromFile() 35 if (!file.Reset()) { in ReadMetadataFromFile() 36 Logger::E(tag, "Reset \"%s\" file failed.", filePath.string()); in ReadMetadataFromFile() 42 if (!file.ReadData((void*)&header, sizeof(MetaComponent))) { in ReadMetadataFromFile() 43 Logger::E(tag, "Read \"%s\" file failed.", filePath.string()); in ReadMetadataFromFile() 48 Logger::E(tag, "The metadata in \"%s\" file is bad.", filePath.string()); in ReadMetadataFromFile() [all …]
|
| /foundation/graphic/graphic_3d/ |
| D | OAT.xml | 5 you may not use this file except in compliance with the License. 16 …This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your pro… 37 … <filteritem type="filename" name="*.rng" desc="shader config file,can not add license head"/> 38 … <filteritem type="filename" name="*.shader" desc="shader config file,can not add license head"/> 39 … <filteritem type="filename" name="*.shaderpl" desc="shader config file,can not add license head"/> 40 … <filteritem type="filename" name="*.shadergs" desc="shader config file,can not add license head"/> 41 …<filteritem type="filename" name="*.shadervid" desc="shader config file,can not add license head"/> 42 … <filteritem type="filename" name="*.shaderrs" desc="shader config file,can not add license head"/> 43 … <filteritem type="filename" name="*.natvis" desc="shader config file,can not add license head"/> 44 … <filteritem type="filename" name="*.vert" desc="shader config file,can not add license head"/> [all …]
|
| /foundation/distributeddatamgr/udmf/framework/innerkitsimpl/test/unittest/ |
| D | file_test.cpp | 4 * you may not use this file except in compliance with the License. 23 #include "file.h" 58 * @tc.desc: Normal testcase of File 66 OHOS::UDMF::File file(type, value); 67 EXPECT_EQ(file.dataType_, UDType::FILE); 68 EXPECT_EQ(file.oriUri_.length(), std::get<std::string>(value).length()); 74 * @tc.desc: Normal testcase of File 82 OHOS::UDMF::File file(type, value); 83 EXPECT_EQ(file.dataType_, UDType::FILE); 84 EXPECT_EQ(file.oriUri_.length(), 0);
|
| /foundation/multimedia/media_library/frameworks/innerkitsimpl/medialibrary_data_extension/src/operation/ |
| D | photo_file_operation.cpp | 4 * you may not use this file except in compliance with the License. 39 * @brief Copy Photo File, include photo file, video file and edit data folder. 62 // No need to copy video file if the Original Photo is not a moving photo. in CopyPhoto() 77 * @brief Copy Photo File, include photo file, video file and edit data folder. 94 * @brief Get the video file path of the photo, without any check. 95 …* @return the video file path of the photo. Only replace the suffix of file extension, such as .jp… 104 * @brief Get the video file path of the photo, without any check. 105 …* @return the video file path of the photo. Only replace the suffix of file extension, such as .jp… 107 * If the photo's file path is empty, return an empty string. 108 * If the photo is a moving photo, return the video file path of the photo. [all …]
|
| /foundation/bundlemanager/bundle_framework/services/bundlemgr/include/ |
| D | zip_file.h | 4 * you may not use this file except in compliance with the License. 33 // Local file header: descript in APPNOTE-6.3.4 34 // local file header signature 4 bytes (0x04034b50) 38 // last mod file time 2 bytes 39 // last mod file date 2 bytes 43 // file name length 2 bytes 59 // central file header 60 // Central File header: 61 // central file header signature 4 bytes (0x02014b50) 66 // last mod file time 2 bytes [all …]
|
| /foundation/distributeddatamgr/preferences/test/native/unittest/ |
| D | preferences_xml_utils_test.cpp | 4 * you may not use this file except in compliance with the License. 77 * @tc.desc: ReadSettingXml testcase of PreferencesXmlUtils, reading a corrupt file 102 std::string file = "/data/test/test01"; variable 110 PreferencesXmlUtils::WriteSettingXml(file, "", "123456", settings); 113 bool ret = PreferencesXmlUtils::ReadSettingXml(file, "", "123456", settingsRes); 120 std::remove(file.c_str()); 157 std::string file = "/data/test/test01"; variable 158 std::remove(file.c_str()); 166 PreferencesXmlUtils::WriteSettingXml(file, "", "", settings); 169 std::shared_ptr<Preferences> pref = PreferencesHelper::GetPreferences(file, errCode); [all …]
|
| /foundation/multimedia/player_framework/test/unittest/screen_capture_test/screen_capture_unittest/include/ |
| D | screen_capture_unit_test.h | 4 * you may not use this file except in compliance with the License. 25 …CaptureUnitTestCallback(std::shared_ptr<ScreenCaptureMock> ScreenCapture, FILE *aFile, FILE *vFile, in ScreenCaptureUnitTestCallback() 42 void DumpBuffer(FILE *file, uint8_t *buffer, int32_t size, int64_t timestamp, 44 void InitCaptureTrackInfo(FILE *file, int32_t flag, AVScreenCaptureBufferType bufferType); 54 FILE *innerAudioFile_ = nullptr; 55 FILE *micAudioFile_ = nullptr; 56 FILE *videoFile_ = nullptr; 62 FILE *aFile_ = nullptr; 63 FILE *vFile_ = nullptr; 95 FILE *aFile = nullptr; [all …]
|
| /foundation/ability/idl_tool/util/ |
| D | file.cpp | 4 * you may not use this file except in compliance with the License. 16 #include "util/file.h" 27 constexpr unsigned int File::READ; 28 constexpr unsigned int File::WRITE; 29 constexpr unsigned int File::APPEND; 32 File::File(const String& path, int mode) in File() function in OHOS::Idl::File 84 File::~File() in ~File() 89 char File::GetChar() in GetChar() 106 char File::PeekChar() in PeekChar() 118 bool File::IsEof() const in IsEof() [all …]
|
| /foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/ |
| D | package_file.cpp | 4 * you may not use this file except in compliance with the License. 42 const string MAGIC = "HW package file"; 64 LOGE("Remove file failed."); in Clear() 68 static int GetChecksum(const string &file, vector<char> &result) in GetChecksum() argument 70 ifstream fileHandle(file, ios::in | ios::binary); in GetChecksum() 114 LOGE("[GetFileContexts] get file attr from path fail, errCode = [%d]", errCode); in GetFileContexts() 119 for (auto file = files.begin(); file != files.end(); file++, countLimit++) { in GetFileContexts() local 121 LOGE("Too deep access for get file context!"); in GetFileContexts() 125 if (file->fileType != OS::FILE && file->fileType != OS::PATH) { in GetFileContexts() 134 if (file->fileName.size() >= MAX_FILE_NAME_LEN) { in GetFileContexts() [all …]
|
| /foundation/bundlemanager/bundle_framework_lite/services/bundlemgr_lite/include/ |
| D | zip_file.h | 4 * you may not use this file except in compliance with the License. 36 // Local file header: descript in APPNOTE-6.3.4 37 // local file header signature 4 bytes (0x04034b50) 41 // last mod file time 2 bytes 42 // last mod file date 2 bytes 46 // file name length 2 bytes 62 // central file header 63 // Central File header: 64 // central file header signature 4 bytes (0x02014b50) 69 // last mod file time 2 bytes [all …]
|
| /foundation/multimedia/image_framework/frameworks/innerkitsimpl/accessor/src/ |
| D | file_metadata_stream.cpp | 4 * you may not use this file except in compliance with the License. 38 ssize_t FileWrapper::FWrite(const void *src, size_t size, ssize_t nmemb, FILE *file) in FWrite() argument 40 return ::fwrite(src, size, nmemb, file); in FWrite() 43 ssize_t FileWrapper::FRead(void *destv, size_t size, ssize_t nmemb, FILE *file) in FRead() argument 45 return ::fread(destv, size, nmemb, file); in FRead() 92 if (fileDescriptor != -1) { // If the operation is through a file descriptor in HandleFileError() 93 IMAGE_LOGE("%{public}s file failed: %{public}d, reason: " in HandleFileError() 96 } else { // If the operation is through a file path in HandleFileError() 97 IMAGE_LOGE("%{public}s file failed: %{public}s, reason: " in HandleFileError() 189 IMAGE_LOGE("Tell file failed: %{public}d, reason: %{public}s", dupFD_, "fp is nullptr"); in Tell() [all …]
|