Home
last modified time | relevance | path

Searched refs:fpath (Results 1 - 10 of 10) sorted by relevance

/foundation/filemanagement/file_api/interfaces/kits/js/src/common/file_helper/
H A Dhash_file.cpp47 static int ForEachFileSegment(const string &fpath, function<void(char *, size_t)> executor) in ForEachFileSegment() argument
49 unique_ptr<FILE, decltype(&fclose)> filp = { fopen(fpath.c_str(), "r"), fclose }; in ForEachFileSegment()
67 tuple<int, string> HashFile::HashWithMD5(const string &fpath) in HashWithMD5() argument
75 int err = ForEachFileSegment(fpath, md5Update); in HashWithMD5()
80 tuple<int, string> HashFile::HashWithSHA1(const string &fpath) in HashWithSHA1() argument
88 int err = ForEachFileSegment(fpath, sha1Update); in HashWithSHA1()
93 tuple<int, string> HashFile::HashWithSHA256(const string &fpath) in HashWithSHA256() argument
101 int err = ForEachFileSegment(fpath, sha256Update); in HashWithSHA256()
H A Dhash_file.h26 static std::tuple<int, std::string> HashWithMD5(const std::string &fpath);
27 static std::tuple<int, std::string> HashWithSHA1(const std::string &fpath);
28 static std::tuple<int, std::string> HashWithSHA256(const std::string &fpath);
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fileio/properties/
H A Dhash.cpp87 auto [succ, fpath, algType, isPromise] = GetHashArgs(env, funcArg); in Async()
93 auto cbExec = [fpath = string(fpath.release()), arg, algType = algType](napi_env env) -> UniError { in Async()
97 tie(ret, res) = HashFile::HashWithMD5(fpath); in Async()
99 tie(ret, res) = HashFile::HashWithSHA1(fpath); in Async()
101 tie(ret, res) = HashFile::HashWithSHA256(fpath); in Async()
/foundation/filemanagement/app_file_service/utils/src/b_filesystem/
H A Db_file_hash.cpp45 static int ForEachFileSegment(const string &fpath, function<void(char *, size_t)> executor) in ForEachFileSegment() argument
47 unique_ptr<FILE, decltype(&fclose)> filp = { fopen(fpath.c_str(), "r"), fclose }; in ForEachFileSegment()
65 tuple<int, string> BackupFileHash::HashWithSHA256(const string &fpath) in HashWithSHA256() argument
73 int err = ForEachFileSegment(fpath, sha256Update); in HashWithSHA256()
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_hash/
H A Dhash.cpp80 auto [succ, fpath, algType, isPromise] = GetHashArgs(env, funcArg); in Async()
87 auto cbExec = [fpath = string(fpath.release()), arg, algType = algType, env = env]() -> NError { in Async()
91 tie(ret, res) = DistributedFS::HashFile::HashWithMD5(fpath); in Async()
93 tie(ret, res) = DistributedFS::HashFile::HashWithSHA1(fpath); in Async()
95 tie(ret, res) = DistributedFS::HashFile::HashWithSHA256(fpath); in Async()
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/
H A Drmdirent.cpp37 static NError RmDirent(const string &fpath) in RmDirent() argument
39 std::filesystem::path strToPath(fpath); in RmDirent()
58 static NError RmDirent(const string &fpath)
67 ret = uv_fs_scandir(nullptr, scandir_req.get(), fpath.c_str(), 0, nullptr);
74 string filePath = fpath + "/" + string(dent.name);
100 ret = uv_fs_rmdir(nullptr, rmdir_req.get(), fpath.c_str(), nullptr);
/foundation/filemanagement/app_file_service/utils/include/b_filesystem/
H A Db_file_hash.h25 static std::tuple<int, std::string> HashWithSHA256(const std::string &fpath);
/foundation/filemanagement/user_file_service/utils/
H A Dfile_util.h220 static NError RmDirent(const string &fpath) in RmDirent() argument
229 ret = uv_fs_scandir(nullptr, scandir_req.get(), fpath.c_str(), 0, nullptr); in RmDirent()
236 string filePath = fpath + "/" + string(dent.name); in RmDirent()
262 ret = uv_fs_rmdir(nullptr, rmdir_req.get(), fpath.c_str(), nullptr); in RmDirent()
/foundation/multimedia/ringtone_library/services/utils/src/
H A Dringtone_file_utils.cpp207 static int32_t UnlinkCb(const char *fpath, const struct stat *sb, int32_t typeflag, struct FTW *ftwbuf) in UnlinkCb() argument
209 CHECK_AND_RETURN_RET_LOG(fpath != nullptr, E_FAIL, "fpath == nullptr"); in UnlinkCb()
210 int32_t errRet = remove(fpath); in UnlinkCb()
212 RINGTONE_ERR_LOG("Failed to remove errno: %{public}d, path: %{private}s", errno, fpath); in UnlinkCb()
/foundation/multimedia/media_library/frameworks/innerkitsimpl/media_library_helper/src/
H A Dmedia_file_utils.cpp226 int32_t UnlinkCb(const char *fpath, const struct stat *sb, int32_t typeflag, struct FTW *ftwbuf) in UnlinkCb() argument
228 CHECK_AND_RETURN_RET_LOG(fpath != nullptr, E_FAIL, "fpath == nullptr"); in UnlinkCb()
229 int32_t errRet = remove(fpath); in UnlinkCb()
231 MEDIA_ERR_LOG("Failed to remove errno: %{public}d, path: %{private}s", errno, fpath); in UnlinkCb()

Completed in 8 milliseconds