/foundation/filemanagement/dfs_service/test/unittests/cloud_disk/mock/ |
H A D | clouddisk_rdbstore_mock.cpp | 66 int32_t CloudDiskRdbStore::GetAttr(const std::string &cloudId, CloudDiskFileInfo &info) in GetAttr() argument 72 const std::string &cloudId, const unsigned long long &size) in SetAttr() 74 if (cloudId == "") { in SetAttr() 80 int32_t CloudDiskRdbStore::ReadDir(const std::string &cloudId, vector<CloudDiskFileInfo> &infos) in ReadDir() argument 85 int32_t CloudDiskRdbStore::Create(const std::string &cloudId, const std::string &parentCloudId, in Create() argument 91 int32_t CloudDiskRdbStore::MkDir(const std::string &cloudId, const std::string &parentCloudId, in MkDir() argument 98 const std::string &cloudId) in Write() 104 const std::string &cloudId, const std::string &value) in LocationSetXattr() 109 int32_t CloudDiskRdbStore::GetRowId(const std::string &cloudId, int64_t &rowId) in GetRowId() argument 111 if (cloudId in GetRowId() 71 SetAttr(const std::string &fileName, const std::string &parentCloudId, const std::string &cloudId, const unsigned long long &size) SetAttr() argument 97 Write(const std::string &fileName, const std::string &parentCloudId, const std::string &cloudId) Write() argument 103 LocationSetXattr(const std::string &name, const std::string &parentCloudId, const std::string &cloudId, const std::string &value) LocationSetXattr() argument 117 GetParentCloudId(const std::string &cloudId, std::string &parentCloudId) GetParentCloudId() argument 122 RecycleSetXattr(const std::string &name, const std::string &parentCloudId, const std::string &cloudId, const std::string &value) RecycleSetXattr() argument 128 FavoriteSetXattr(const std::string &cloudId, const std::string &value) FavoriteSetXattr() argument 139 FavoriteGetXattr(const std::string &cloudId, const std::string &key, std::string &value) FavoriteGetXattr() argument 144 FileStatusGetXattr(const std::string &cloudId, const std::string &key, std::string &value) FileStatusGetXattr() argument 149 GetExtAttrValue(const std::string &cloudId, const std::string &key, std::string &value) GetExtAttrValue() argument 154 GetExtAttr(const std::string &cloudId, std::string &value, int32_t &position) GetExtAttr() argument 159 GetXAttr(const std::string &cloudId, const std::string &key, std::string &value, const CacheNode &node, const std::string &extAttrKey) GetXAttr() argument 168 ExtAttributeSetXattr(const std::string &cloudId, const std::string &value, const std::string &key) ExtAttributeSetXattr() argument 174 SetXAttr(const std::string &cloudId, const std::string &key, const std::string &value, const std::string &name, const std::string &parentCloudId) SetXAttr() argument 192 GetHasChild(const std::string &cloudId, bool &hasChild) GetHasChild() argument 197 UnlinkSynced(const std::string &cloudId) UnlinkSynced() argument 202 UnlinkLocal(const std::string &cloudId) UnlinkLocal() argument 207 Unlink(const std::string &cloudId, const int32_t &position) Unlink() argument 212 GetDirtyType(const std::string &cloudId, int32_t &dirtyType) GetDirtyType() argument 217 GetCurNode(const std::string &cloudId, CacheNode &curNode) GetCurNode() argument [all...] |
H A D | file_operations_cloud_mock.cpp | 130 int64_t inodeId = static_cast<int64_t>(CloudFileUtils::DentryHash(metaBase.cloudId)); in LookupRecycledFile() 221 static int32_t CreateLocalFile(const string &cloudId, const string &bundleName, int32_t userId, mode_t mode) in CreateLocalFile() argument 223 string bucketPath = CloudFileUtils::GetLocalBucketPath(cloudId, bundleName, userId); in CreateLocalFile() 224 string path = CloudFileUtils::GetLocalFilePath(cloudId, bundleName, userId); in CreateLocalFile() 247 int32_t GenerateCloudId(int32_t userId, string &cloudId, const string &bundleName) in GenerateCloudId() argument 260 cloudId = ids[0]; in GenerateCloudId() 272 string cloudId; in DoCreatFile() local 273 int32_t err = GenerateCloudId(data->userId, cloudId, parentInode->bundleName); in DoCreatFile() 279 int32_t fd = CreateLocalFile(cloudId, parentInode->bundleName, data->userId, mode); in DoCreatFile() 286 string path = CloudFileUtils::GetLocalFilePath(cloudId, parentInod in DoCreatFile() 556 string cloudId = metaBase.cloudId; DoCloudUnlink() local [all...] |
H A D | file_operations_helper_mock.cpp | 113 ptr->cloudId = "mock"; in FindCloudDiskInode() 117 ptr->cloudId = "mock"; in FindCloudDiskInode() 122 ptr->cloudId = ""; in FindCloudDiskInode()
|
/foundation/filemanagement/dfs_service/services/clouddisk_database/include/ |
H A D | clouddisk_rdbstore.h | 43 int32_t GetAttr(const std::string &cloudId, CloudDiskFileInfo &info); 44 int32_t SetAttr(const std::string &fileName, const std::string &parentCloudId, const std::string &cloudId, 46 int32_t ReadDir(const std::string &cloudId, std::vector<CloudDiskFileInfo> &infos); 47 int32_t MkDir(const std::string &cloudId, const std::string &parentCloudId, 49 int32_t Create(const std::string &cloudId, const std::string &parentCloudId, 51 int32_t Write(const std::string &fileName, const std::string &parentCloudId, const std::string &cloudId); 52 int32_t GetXAttr(const std::string &cloudId, const std::string &key, std::string &value, 54 int32_t SetXAttr(const std::string &cloudId, const std::string &key, const std::string &value, 58 int32_t Unlink(const std::string &cloudId, const int32_t &position); 60 const std::string &cloudId, cons [all...] |
H A D | clouddisk_notify_utils.h | 41 static int32_t GetCacheNode(const string &cloudId, CacheNode &cacheNode); 42 static void PutCacheNode(const string &cloudId, const CacheNode &cacheNode);
|
H A D | clouddisk_db_const.h | 58 std::string cloudId; member
|
H A D | clouddisk_notify_const.h | 66 std::string cloudId = ""; member
|
/foundation/filemanagement/dfs_service/test/unittests/utils/cloud_disk/ |
H A D | cloud_file_utils_test.cpp | 49 string cloudId = CloudFileUtils::GetCloudId(""); in HWTEST_F() local 50 EXPECT_EQ((cloudId == ""), true); in HWTEST_F() 52 cloudId = CloudFileUtils::GetCloudId("test"); in HWTEST_F() 53 EXPECT_EQ((cloudId == ""), true); in HWTEST_F() 58 string cloudId; in HWTEST_F() local 61 string bucketPath = CloudFileUtils::GetLocalBucketPath(cloudId, bundleName, userId); in HWTEST_F() 62 EXPECT_EQ((cloudId == ""), true); in HWTEST_F() 67 string cloudId = "testId"; in HWTEST_F() local 70 string bucketPath = CloudFileUtils::GetLocalBucketPath(cloudId, bundleName, userId); in HWTEST_F() 71 EXPECT_EQ((cloudId in HWTEST_F() 103 string cloudId; HWTEST_F() local 177 string cloudId = CloudFileUtils::GetCloudId(dfsPath); HWTEST_F() local [all...] |
/foundation/filemanagement/dfs_service/test/unittests/clouddisk_database/ |
H A D | clouddisk_rdbstore_test.cpp | 216 const std::string cloudId = ""; in HWTEST_F() local 221 int32_t ret = clouddiskrdbStore_->GetAttr(cloudId, info); in HWTEST_F() 233 const std::string cloudId = "100"; in HWTEST_F() local 238 int32_t ret = clouddiskrdbStore_->GetAttr(cloudId, info); in HWTEST_F() 250 const std::string cloudId = "100"; in HWTEST_F() local 254 int32_t ret = clouddiskrdbStore_->GetAttr(cloudId, info); in HWTEST_F() 268 const std::string cloudId = ""; in HWTEST_F() local 272 int32_t ret = clouddiskrdbStore_->SetAttr(fileName, parentCloudId, cloudId, size); in HWTEST_F() 286 const std::string cloudId = "rootId"; in HWTEST_F() local 290 int32_t ret = clouddiskrdbStore_->SetAttr(fileName, parentCloudId, cloudId, siz in HWTEST_F() 304 const std::string cloudId = "100"; HWTEST_F() local 324 const std::string cloudId = "100"; HWTEST_F() local 344 const std::string cloudId = "100"; HWTEST_F() local 362 const std::string cloudId = "rootId"; HWTEST_F() local 378 const std::string cloudId = "rootId"; HWTEST_F() local 396 const std::string cloudId = "rootId"; HWTEST_F() local 414 const std::string cloudId = "rootId"; HWTEST_F() local 432 const std::string cloudId = "rootId"; HWTEST_F() local 450 const std::string cloudId = ""; HWTEST_F() local 468 const std::string cloudId = "rootId"; HWTEST_F() local 487 const std::string cloudId = "rootId"; HWTEST_F() local 508 const std::string cloudId = "rootId"; HWTEST_F() local 529 const std::string cloudId = "rootId"; HWTEST_F() local 550 const std::string cloudId = "100"; HWTEST_F() local 568 const std::string cloudId = "100"; HWTEST_F() local 586 const std::string cloudId = ""; HWTEST_F() local 604 const std::string cloudId = "100"; HWTEST_F() local 624 const std::string cloudId = "100"; HWTEST_F() local 644 const std::string cloudId = "100"; HWTEST_F() local 664 const std::string cloudId = ""; HWTEST_F() local 681 const std::string cloudId = "100"; HWTEST_F() local 699 const std::string cloudId = "100"; HWTEST_F() local 719 const std::string cloudId = "100"; HWTEST_F() local 739 const std::string cloudId = "100"; HWTEST_F() local 761 const std::string cloudId = "100"; HWTEST_F() local 779 const std::string cloudId = "100"; HWTEST_F() local 799 const std::string cloudId = "100"; HWTEST_F() local 819 const std::string cloudId = "100"; HWTEST_F() local 837 const std::string cloudId = "100"; HWTEST_F() local 856 const std::string cloudId = "100"; HWTEST_F() local 877 const std::string cloudId = "100"; HWTEST_F() local 898 const std::string cloudId = "100"; HWTEST_F() local 917 const std::string cloudId = "100"; HWTEST_F() local 938 const std::string cloudId = "100"; HWTEST_F() local 959 const std::string cloudId = "100"; HWTEST_F() local 982 const std::string cloudId = "100"; HWTEST_F() local 1000 const std::string cloudId = "100"; HWTEST_F() local 1018 const std::string cloudId = "100"; HWTEST_F() local 1038 const std::string cloudId = "100"; HWTEST_F() local 1060 const std::string cloudId = "100"; HWTEST_F() local 1084 const std::string cloudId = "100"; HWTEST_F() local 1106 const std::string cloudId = "rootId"; HWTEST_F() local 1122 const std::string cloudId = "root"; HWTEST_F() local 1138 const std::string cloudId = "root"; HWTEST_F() local 1156 const std::string cloudId = "root"; HWTEST_F() local 1174 const std::string cloudId = ""; HWTEST_F() local 1193 const std::string cloudId = ""; HWTEST_F() local 1212 const std::string cloudId = ""; HWTEST_F() local 1231 const std::string cloudId = ""; HWTEST_F() local 1248 const std::string cloudId = "cloudId"; HWTEST_F() local 1268 const std::string cloudId = "cloudId"; HWTEST_F() local 1290 const std::string cloudId = "cloudId"; HWTEST_F() local 1312 const std::string cloudId = ""; HWTEST_F() local 1329 const std::string cloudId = "cloudId"; HWTEST_F() local 1349 const std::string cloudId = "cloudId"; HWTEST_F() local 1371 const std::string cloudId = "cloudId"; HWTEST_F() local 1392 const std::string cloudId = ""; HWTEST_F() local 1408 const std::string cloudId = "100"; HWTEST_F() local 1427 const std::string cloudId = ""; HWTEST_F() local 1443 const std::string cloudId = "100"; HWTEST_F() local 1462 const std::string cloudId = "100"; HWTEST_F() local 1483 const std::string cloudId = "100"; HWTEST_F() local 1504 const std::string cloudId = "100"; HWTEST_F() local 1525 const std::string cloudId = "100"; HWTEST_F() local 1547 const std::string cloudId = ""; HWTEST_F() local 1567 const std::string cloudId = ""; HWTEST_F() local 1584 const std::string cloudId = ""; HWTEST_F() local 1601 const std::string cloudId = ""; HWTEST_F() local 1618 const std::string cloudId = ""; HWTEST_F() local 1634 const std::string cloudId = "root"; HWTEST_F() local 1656 const std::string cloudId = "root"; HWTEST_F() local 1679 const std::string cloudId = "100"; HWTEST_F() local 1698 const std::string cloudId = "100"; HWTEST_F() local 1717 const std::string cloudId = "100"; HWTEST_F() local 1736 const std::string cloudId = "100"; HWTEST_F() local 1755 const std::string cloudId = "100"; HWTEST_F() local 1864 const std::string cloudId = "100"; HWTEST_F() local 1882 const std::string cloudId = "100"; HWTEST_F() local 1902 const std::string cloudId = "100"; HWTEST_F() local 1922 const std::string cloudId = "100"; HWTEST_F() local 1939 const std::string cloudId = "100"; HWTEST_F() local 1956 const std::string cloudId = "100"; HWTEST_F() local 1973 const std::string cloudId = "100"; HWTEST_F() local 1990 std::string cloudId = ""; HWTEST_F() local 2007 std::string cloudId = "100"; HWTEST_F() local 2024 std::string cloudId = "100"; HWTEST_F() local 2041 std::string cloudId = "100"; HWTEST_F() local 2060 std::string cloudId = "100"; HWTEST_F() local 2081 std::string cloudId = "100"; HWTEST_F() local 2102 std::string cloudId = "100"; HWTEST_F() local 2123 std::string cloudId = ""; HWTEST_F() local 2139 std::string cloudId = "100"; HWTEST_F() local 2158 std::string cloudId = "100"; HWTEST_F() local 2179 std::string cloudId = "100"; HWTEST_F() local 2201 std::string cloudId = "100"; HWTEST_F() local [all...] |
H A D | clouddisk_notify_test.cpp | 207 ino->cloudId = "mock"; in HWTEST_F() 231 ino->cloudId = "rootId"; in HWTEST_F() 255 ino->cloudId = "rootId"; in HWTEST_F() 279 ino->cloudId = "rootId"; in HWTEST_F() 598 paramService.cloudId = "mock"; in HWTEST_F() 617 paramService.cloudId = "rootId"; in HWTEST_F() 636 paramService.node.cloudId = "mock"; in HWTEST_F() 654 paramService.cloudId = "mock"; in HWTEST_F() 672 paramService.cloudId = "rootId"; in HWTEST_F() 691 paramService.cloudId in HWTEST_F() [all...] |
H A D | clouddisk_notify_utils_test.cpp | 319 string cloudId = "100"; in HWTEST_F() local 321 int ret = CloudDiskNotifyUtils.GetCacheNode(cloudId, cacheNode); in HWTEST_F() 336 string cloudId = "100"; in HWTEST_F() local 339 CloudDiskNotifyUtils.PutCacheNode(cloudId, cacheNode); in HWTEST_F() 353 string cloudId = "100"; in HWTEST_F() local 356 CloudDiskNotifyUtils.PutCacheNode(cloudId, cacheNode); in HWTEST_F() 374 cacheNode.cloudId = ""; in HWTEST_F()
|
/foundation/filemanagement/dfs_service/services/clouddisk_database/src/ |
H A D | clouddisk_rdbstore.cpp | 205 int32_t CloudDiskRdbStore::GetAttr(const std::string &cloudId, CloudDiskFileInfo &info) in GetAttr() argument 208 if (cloudId.empty() || cloudId == ROOT_CLOUD_ID) { in GetAttr() 213 getAttrPredicates.EqualTo(FileColumn::CLOUD_ID, cloudId); in GetAttr() 224 const std::string &cloudId, const unsigned long long &size) in SetAttr() 227 if (cloudId.empty()) { in SetAttr() 228 LOGE("cloudId is empty"); in SetAttr() 231 if (cloudId == ROOT_CLOUD_ID) { in SetAttr() 232 LOGE("cloudId is rootId"); in SetAttr() 239 bindArgs.emplace_back(cloudId); in SetAttr() 223 SetAttr(const std::string &fileName, const std::string &parentCloudId, const std::string &cloudId, const unsigned long long &size) SetAttr() argument 269 ReadDir(const std::string &cloudId, vector<CloudDiskFileInfo> &infos) ReadDir() argument 407 HandleCreateValue(ValuesBucket &fileInfo, const std::string &cloudId, const std::string &parentCloudId, const std::string &fileName, const std::string &bundleName) HandleCreateValue() argument 418 Create(const std::string &cloudId, const std::string &parentCloudId, const std::string &fileName, bool noNeedUpload) Create() argument 474 MkDir(const std::string &cloudId, const std::string &parentCloudId, const std::string &directoryName, bool noNeedUpload) MkDir() argument 571 Write(const std::string &fileName, const std::string &parentCloudId, const std::string &cloudId) Write() argument 622 LocationSetXattr(const std::string &name, const std::string &parentCloudId, const std::string &cloudId, const std::string &value) LocationSetXattr() argument 664 GetRowId(const std::string &cloudId, int64_t &rowId) GetRowId() argument 704 GetParentCloudId(const std::string &cloudId, std::string &parentCloudId) GetParentCloudId() argument 726 RecycleSetXattr(const std::string &name, const std::string &parentCloudId, const std::string &cloudId, const std::string &value) RecycleSetXattr() argument 777 FavoriteSetXattr(const std::string &cloudId, const std::string &value) FavoriteSetXattr() argument 843 FavoriteGetXattr(const std::string &cloudId, const std::string &key, std::string &value) FavoriteGetXattr() argument 867 FileStatusGetXattr(const std::string &cloudId, const std::string &key, std::string &value) FileStatusGetXattr() argument 895 GetExtAttrValue(const std::string &cloudId, const std::string &key, std::string &value) GetExtAttrValue() argument 926 GetExtAttr(const std::string &cloudId, std::string &value, int32_t &position) GetExtAttr() argument 960 GetXAttr(const std::string &cloudId, const std::string &key, std::string &value, const CacheNode &node, const std::string &extAttrKey) GetXAttr() argument 1010 ExtAttributeSetXattr(const std::string &cloudId, const std::string &value, const std::string &key) ExtAttributeSetXattr() argument 1040 SetXAttr(const std::string &cloudId, const std::string &key, const std::string &value, const std::string &name, const std::string &parentCloudId) SetXAttr() argument 1166 GetHasChild(const std::string &cloudId, bool &hasChild) GetHasChild() argument 1187 UnlinkSynced(const std::string &cloudId) UnlinkSynced() argument 1204 UnlinkLocal(const std::string &cloudId) UnlinkLocal() argument 1218 Unlink(const std::string &cloudId, const int32_t &position) Unlink() argument 1234 GetDirtyType(const std::string &cloudId, int32_t &dirtyType) GetDirtyType() argument 1257 GetCurNode(const std::string &cloudId, CacheNode &curNode) GetCurNode() argument [all...] |
H A D | clouddisk_notify_utils.cpp | 118 int32_t CloudDiskNotifyUtils::GetCacheNode(const string &cloudId, CacheNode &cacheNode) in GetCacheNode() argument 121 auto it = cacheMap_.find(cloudId); in GetCacheNode() 123 LOGI("Not fount in cache, id: %{public}s", cloudId.c_str()); in GetCacheNode() 131 void CloudDiskNotifyUtils::PutCacheNode(const string &cloudId, const CacheNode &cacheNode) in PutCacheNode() argument 137 auto it = cacheMap_.find(cloudId); in PutCacheNode() 151 cacheList_.emplace_front(cloudId, cacheNode); in PutCacheNode() 152 cacheMap_[cloudId] = cacheList_.begin(); in PutCacheNode() 161 PutCacheNode(cacheNode.cloudId, cacheNode); in GetUriFromCache()
|
H A D | clouddisk_notify.cpp | 75 static int32_t TrashUriAddRowId(shared_ptr<CloudDiskRdbStore> rdbStore, const string &cloudId, string &uri) in TrashUriAddRowId() argument 78 int32_t ret = rdbStore->GetRowId(cloudId, rowId); in TrashUriAddRowId() 139 if (TrashUriAddRowId(rdbStore, paramDisk.inoPtr->cloudId, trashNotifyData.uri) != E_OK) { in HandleRecycleRestore() 272 if (TrashUriAddRowId(rdbStore, paramService.cloudId, notifyData.uri) != E_OK) { in HandleInsert() 294 CacheNode curNode{paramService.cloudId}; in HandleUpdate() 295 if (rdbStore->GetCurNode(paramService.cloudId, curNode) == E_OK && in HandleUpdate() 320 if (TrashUriAddRowId(rdbStore, paramService.cloudId, trashNotifyData.uri) != E_OK) { in HandleUpdateRecycle() 344 if (paramService.cloudId.empty()) { in HandleDelete() 400 string cloudId = static_cast<string>(deleteId); in GetDeleteNotifyData() local 401 CacheNode curNode{cloudId}; in GetDeleteNotifyData() [all...] |
/foundation/filemanagement/dfs_service/services/cloudfiledaemon/src/cloud_disk/ |
H A D | file_operations_cloud.cpp | 85 childInode->cloudId = metaBase.cloudId; in InitInodeAttr() 138 child->cloudId = RECYCLE_CLOUD_ID; in LookUpRecycleBin() 181 int64_t inodeId = static_cast<int64_t>(CloudFileUtils::DentryHash(metaBase.cloudId)); in LookupRecycledFile() 226 parentInode->cloudId); in DoCloudLookup() 233 int64_t inodeId = static_cast<int64_t>(CloudFileUtils::DentryHash(metaBase.cloudId)); in DoCloudLookup() 346 string cloudId = inoPtr->cloudId; in CloudOpen() local 347 LOGD("cloudId: %s", cloudId in CloudOpen() 412 CreateLocalFile(const string &cloudId, const string &bundleName, int32_t userId, mode_t mode) CreateLocalFile() argument 440 GenerateCloudId(int32_t userId, string &cloudId, const string &bundleName) GenerateCloudId() argument 487 string cloudId; DoCreatFile() local 1045 string cloudId; MkDir() local 1092 string cloudId = metaBase.cloudId; DoCloudUnlink() local [all...] |
/foundation/filemanagement/dfs_service/utils/cloud_disk/src/ |
H A D | cloud_file_utils.cpp | 133 uint32_t CloudFileUtils::GetBucketId(string cloudId) in GetBucketId() argument 135 size_t size = cloudId.size(); in GetBucketId() 140 char first = cloudId[0]; in GetBucketId() 141 char last = cloudId[size - 1]; in GetBucketId() 142 char middle = cloudId[size / CLOUD_ID_BUCKET_MID_TIMES]; in GetBucketId() 151 string CloudFileUtils::GetLocalBucketPath(string cloudId, string bundleName, int32_t userId) in GetLocalBucketPath() argument 155 uint32_t bucketId = GetBucketId(cloudId); in GetLocalBucketPath() 160 string CloudFileUtils::GetLocalFilePath(string cloudId, string bundleName, int32_t userId) in GetLocalFilePath() argument 162 return GetLocalBucketPath(cloudId, bundleName, userId) + "/" + cloudId; in GetLocalFilePath() 190 char cloudId[idSize + 1]; GetCloudId() local [all...] |
/foundation/filemanagement/dfs_service/test/unittests/clouddisk_database/mock/ |
H A D | clouddisk_notify_utils_mock.cpp | 99 int32_t CloudDiskNotifyUtils::GetCacheNode(const string &cloudId, CacheNode &cacheNode)
in GetCacheNode() argument 102 auto it = cacheMap_.find(cloudId);
in GetCacheNode() 104 LOGI("Not fount in cache, id: %{public}s", cloudId.c_str());
in GetCacheNode() 112 void CloudDiskNotifyUtils::PutCacheNode(const string &cloudId, const CacheNode &cacheNode)
in PutCacheNode() argument 118 auto it = cacheMap_.find(cloudId);
in PutCacheNode() 132 cacheList_.emplace_front(cloudId, cacheNode);
in PutCacheNode() 133 cacheMap_[cloudId] = cacheList_.begin();
in PutCacheNode()
|
H A D | meta_file_clouddisk_mock.cpp | 90 const std::string &cloudId) in GetCloudDiskDentryFileByPath() 95 std::to_string(CloudDisk::CloudFileUtils::GetBucketId(cloudId)) + "/"; in GetCloudDiskDentryFileByPath() 96 std::string dentryFileName = MetaFileMgr::GetInstance().CloudIdToRecordId(cloudId); in GetCloudDiskDentryFileByPath() 101 CloudDiskMetaFile::CloudDiskMetaFile(uint32_t userId, const std::string &bundleName, const std::string &cloudId) in CloudDiskMetaFile() argument 334 ret = memcpy_s(de->recordId, CLOUD_RECORD_ID_LEN, base.cloudId.c_str(), base.cloudId.length()); in UpdateDentry() 336 LOGE("memcpy_s failed, dstLen = %{public}d, srcLen = %{public}zu", CLOUD_RECORD_ID_LEN, base.cloudId.length()); in UpdateDentry() 502 const std::string &cloudId) in Clear() 505 MetaFileKey key(userId, cloudId + bundleName); in Clear() 518 const std::string &cloudId) in GetCloudDiskMetaFile() 89 GetCloudDiskDentryFileByPath(uint32_t userId, const std::string &bundleName, const std::string &cloudId) GetCloudDiskDentryFileByPath() argument 501 Clear(uint32_t userId, const std::string &bundleName, const std::string &cloudId) Clear() argument 517 GetCloudDiskMetaFile(uint32_t userId, const std::string &bundleName, const std::string &cloudId) GetCloudDiskMetaFile() argument [all...] |
/foundation/filemanagement/dfs_service/utils/inner_api/ |
H A D | cloud_file_utils.h | 25 std::string cloudId; member 57 static std::string GetLocalBucketPath(std::string cloudId, std::string bundleName, 59 static std::string GetLocalFilePath(std::string cloudId, std::string bundleName, 63 static uint32_t GetBucketId(std::string cloudId); 66 static uint32_t DentryHash(const std::string &cloudId);
|
/foundation/filemanagement/dfs_service/utils/dentry/include/ |
H A D | meta_file.h | 81 explicit CloudDiskMetaFile(uint32_t userId, const std::string &bundleName, const std::string &cloudId); 133 /* recordId is hex string of 256 bits, convert to u8 cloudId[32] to kernel */ 135 static std::string CloudIdToRecordId(const std::string cloudId); 138 const std::string &cloudId); 141 void Clear(uint32_t userId, const std::string &bundleName, const std::string &cloudId); 163 MetaBase(const std::string &name, const std::string &cloudId) : name(name), cloudId(cloudId) {} in MetaBase() 171 return other.cloudId == cloudId in operator ==() [all...] |
/foundation/filemanagement/dfs_service/utils/dentry/src/ |
H A D | meta_file_clouddisk.cpp | 118 const std::string &cloudId) in GetCloudDiskDentryFileByPath() 123 std::to_string(CloudDisk::CloudFileUtils::GetBucketId(cloudId)) + "/"; in GetCloudDiskDentryFileByPath() 124 std::string dentryFileName = MetaFileMgr::GetInstance().CloudIdToRecordId(cloudId); in GetCloudDiskDentryFileByPath() 129 CloudDiskMetaFile::CloudDiskMetaFile(uint32_t userId, const std::string &bundleName, const std::string &cloudId) in CloudDiskMetaFile() argument 133 cloudId_ = cloudId; in CloudDiskMetaFile() 136 LOGD("CloudDiskMetaFile cloudId=%{public}s, path=%{public}s", cloudId_.c_str(), GetAnonyString(cacheFile_).c_str()); in CloudDiskMetaFile() 311 ret = memcpy_s(de->recordId, CLOUD_RECORD_ID_LEN, base.cloudId.c_str(), base.cloudId.length()); in UpdateDentry() 313 LOGE("memcpy_s failed, dstLen = %{public}d, srcLen = %{public}zu", CLOUD_RECORD_ID_LEN, base.cloudId.length()); in UpdateDentry() 555 base.cloudId in DoLookup() 117 GetCloudDiskDentryFileByPath(uint32_t userId, const std::string &bundleName, const std::string &cloudId) GetCloudDiskDentryFileByPath() argument 667 Clear(uint32_t userId, const std::string &bundleName, const std::string &cloudId) Clear() argument 683 GetCloudDiskMetaFile(uint32_t userId, const std::string &bundleName, const std::string &cloudId) GetCloudDiskMetaFile() argument [all...] |
H A D | meta_file.cpp | 296 ret = memcpy_s(de->recordId, CLOUD_RECORD_ID_LEN, base.cloudId.c_str(), base.cloudId.length()); in UpdateDentry() 298 LOGE("memcpy_s failed, dstLen = %{public}d, srcLen = %{public}zu", CLOUD_RECORD_ID_LEN, base.cloudId.length()); in UpdateDentry() 552 base.cloudId = std::string(reinterpret_cast<const char *>(de->recordId), CLOUD_RECORD_ID_LEN - 1); in DoLookup() 578 if (memcpy_s(de->recordId, CLOUD_RECORD_ID_LEN, base.cloudId.c_str(), base.cloudId.length())) { in DoUpdate() 579 LOGE("memcpy_s failed, dstLen = %{public}d, srcLen = %{public}zu", CLOUD_RECORD_ID_LEN, base.cloudId.length()); in DoUpdate() 634 base.cloudId = std::string(reinterpret_cast<const char *>(dentryGroup.nsl[i].recordId), CLOUD_RECORD_ID_LEN); in DecodeDentrys() 727 std::string MetaFileMgr::CloudIdToRecordId(const std::string cloudId) in CloudIdToRecordId() argument 731 for (std::size_t i = 0; i < cloudId in CloudIdToRecordId() [all...] |
/foundation/filemanagement/dfs_service/test/unittests/cloudsync_sa/mock/ |
H A D | cloud_file_utils_mock.cpp | 63 uint32_t CloudFileUtils::GetBucketId(string cloudId) in GetBucketId() argument 73 string CloudFileUtils::GetLocalBucketPath(string cloudId, string bundleName, int32_t userId) in GetLocalBucketPath() argument 78 string CloudFileUtils::GetLocalFilePath(string cloudId, string bundleName, int32_t userId) in GetLocalFilePath() argument
|
/foundation/filemanagement/dfs_service/test/fuzztest/clouddisknotify_fuzzer/ |
H A D | clouddisknotify_fuzzer.cpp | 43 cacheNode.cloudId = fuzzData.GetStringFromData(len); in TryNotifyServiceFuzzTest() 67 string cloudId = fuzzData.GetStringFromData(len); in GetDeleteNotifyDataFuzzTest() local 68 deleteIds.emplace_back(cloudId); in GetDeleteNotifyDataFuzzTest()
|
/foundation/filemanagement/dfs_service/test/unittests/cloudsync_sa/dentry/ |
H A D | dentry_meta_file_clouddisk_test.cpp | 389 string cloudId = "testLongLongfileName"; in HWTEST_F() local 391 MetaBase metaBase(fileName, cloudId); in HWTEST_F() 522 string cloudId = "id1"; in HWTEST_F() local 524 MetaBase metaBase(fileName, cloudId); in HWTEST_F()
|