Lines Matching refs:filePath

36 bool RustLoadStringFromFile(const rust::String& filePath, rust::String& content)
38 std::string tmpPath(filePath);
57 bool RustLoadBufferFromFile(const rust::String& filePath, rust::vec<char>& content)
59 std::string tmpPath(filePath);
68 bool RustSaveBufferToFile(const rust::String& filePath, const rust::vec<char>& content, bool truncated)
70 std::string tmpPath(filePath);
75 bool RustSaveStringToFile(const rust::String& filePath, const rust::String& content, bool truncated)
77 std::string tmpPath(filePath);
110 bool LoadStringFromFile(const string& filePath, string& content)
112 ifstream file(filePath.c_str());
114 UTILS_LOGD("open file failed! filePath:%{public}s", filePath.c_str());
203 bool SaveStringToFile(const std::string& filePath, const std::string& content, bool truncated /*= true*/)
212 file.open(filePath.c_str(), ios::out | ios::trunc);
214 file.open(filePath.c_str(), ios::out | ios::app);
218 UTILS_LOGD("open file failed! filePath:%{private}s", filePath.c_str());
225 filePath.c_str(), content.c_str());
258 bool LoadBufferFromNodeFile(const string& filePath, vector<char>& content)
261 if (!PathToRealPath(filePath, realPath)) {
262 UTILS_LOGD("filePath to realPath failed! filePath:%{private}s", filePath.c_str());
268 UTILS_LOGD("open file failed! filePath:%{private}s", realPath.c_str());
294 bool LoadBufferFromFile(const string& filePath, vector<char>& content)
297 file.open(filePath.c_str(), ios::in | ios::binary);
299 UTILS_LOGD("open file failed! filePath:%{private}s", filePath.c_str());
312 return LoadBufferFromNodeFile(filePath, content);
322 UTILS_LOGE("seekg file to begin failed!filePath:%{private}s", filePath.c_str());
331 bool SaveBufferToFile(const string& filePath, const vector<char>& content, bool truncated /*= true*/)
341 file.open(filePath.c_str(), mode);
343 UTILS_LOGD("open file failed! filePath:%{private}s, mode:%{private}d", filePath.c_str(), mode);
366 UTILS_LOGD("File load fail, filePath:%{private}s", fileName.c_str());
408 UTILS_LOGD("File load fail, filePath:%{private}s", fileName.c_str());