@@ -42,7 +42,7 @@ Result ArticArchive::RespResult(const std::optional<Network::ArticBase::Client::
42
42
43
43
ArticArchive::~ArticArchive () {
44
44
if (clear_cache_on_close) {
45
- cache_provider. ClearAllCache ();
45
+ cache_provider-> ClearAllCache ();
46
46
}
47
47
if (archive_handle != -1 ) {
48
48
auto req = client->NewRequest (" FSUSER_CloseArchive" );
@@ -84,7 +84,7 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArticArchive::Open(
84
84
85
85
void ArticArchive::Close () {
86
86
if (clear_cache_on_close) {
87
- cache_provider. ClearAllCache ();
87
+ cache_provider-> ClearAllCache ();
88
88
}
89
89
90
90
auto req = client->NewRequest (" FSUSER_CloseArchive" );
@@ -104,8 +104,8 @@ std::string ArticArchive::GetName() const {
104
104
ResultVal<std::unique_ptr<FileBackend>> ArticArchive::OpenFile (const Path& path, const Mode& mode,
105
105
u32 attributes) {
106
106
if (mode.create_flag ) {
107
- auto cache = cache_provider. ProvideCache (
108
- client, cache_provider. PathsToVector (archive_path, path), false );
107
+ auto cache = cache_provider-> ProvideCache (
108
+ client, cache_provider-> PathsToVector (archive_path, path), false );
109
109
if (cache != nullptr ) {
110
110
cache->Clear ();
111
111
}
@@ -129,8 +129,8 @@ ResultVal<std::unique_ptr<FileBackend>> ArticArchive::OpenFile(const Path& path,
129
129
130
130
auto size_opt = resp->GetResponseU64 (1 );
131
131
if (size_opt.has_value ()) {
132
- auto cache = cache_provider. ProvideCache (
133
- client, cache_provider. PathsToVector (archive_path, path), true );
132
+ auto cache = cache_provider-> ProvideCache (
133
+ client, cache_provider-> PathsToVector (archive_path, path), true );
134
134
if (cache != nullptr ) {
135
135
cache->ForceSetSize (static_cast <size_t >(*size_opt));
136
136
}
@@ -144,8 +144,8 @@ ResultVal<std::unique_ptr<FileBackend>> ArticArchive::OpenFile(const Path& path,
144
144
}
145
145
146
146
Result ArticArchive::DeleteFile (const Path& path) const {
147
- auto cache = cache_provider. ProvideCache (
148
- client, cache_provider. PathsToVector (archive_path, path), false );
147
+ auto cache = cache_provider-> ProvideCache (
148
+ client, cache_provider-> PathsToVector (archive_path, path), false );
149
149
if (cache != nullptr ) {
150
150
cache->Clear ();
151
151
}
@@ -160,13 +160,13 @@ Result ArticArchive::DeleteFile(const Path& path) const {
160
160
}
161
161
162
162
Result ArticArchive::RenameFile (const Path& src_path, const Path& dest_path) const {
163
- auto cache = cache_provider. ProvideCache (
164
- client, cache_provider. PathsToVector (archive_path, src_path), false );
163
+ auto cache = cache_provider-> ProvideCache (
164
+ client, cache_provider-> PathsToVector (archive_path, src_path), false );
165
165
if (cache != nullptr ) {
166
166
cache->Clear ();
167
167
}
168
- cache = cache_provider. ProvideCache (
169
- client, cache_provider. PathsToVector (archive_path, dest_path), false );
168
+ cache = cache_provider-> ProvideCache (
169
+ client, cache_provider-> PathsToVector (archive_path, dest_path), false );
170
170
if (cache != nullptr ) {
171
171
cache->Clear ();
172
172
}
@@ -184,7 +184,7 @@ Result ArticArchive::RenameFile(const Path& src_path, const Path& dest_path) con
184
184
}
185
185
186
186
Result ArticArchive::DeleteDirectory (const Path& path) const {
187
- cache_provider. ClearAllCache ();
187
+ cache_provider-> ClearAllCache ();
188
188
189
189
auto req = client->NewRequest (" FSUSER_DeleteDirectory" );
190
190
@@ -196,7 +196,7 @@ Result ArticArchive::DeleteDirectory(const Path& path) const {
196
196
}
197
197
198
198
Result ArticArchive::DeleteDirectoryRecursively (const Path& path) const {
199
- cache_provider. ClearAllCache ();
199
+ cache_provider-> ClearAllCache ();
200
200
201
201
auto req = client->NewRequest (" FSUSER_DeleteDirectoryRec" );
202
202
@@ -208,8 +208,8 @@ Result ArticArchive::DeleteDirectoryRecursively(const Path& path) const {
208
208
}
209
209
210
210
Result ArticArchive::CreateFile (const Path& path, u64 size, u32 attributes) const {
211
- auto cache = cache_provider. ProvideCache (
212
- client, cache_provider. PathsToVector (archive_path, path), false );
211
+ auto cache = cache_provider-> ProvideCache (
212
+ client, cache_provider-> PathsToVector (archive_path, path), false );
213
213
if (cache != nullptr ) {
214
214
cache->Clear ();
215
215
}
@@ -237,7 +237,7 @@ Result ArticArchive::CreateDirectory(const Path& path, u32 attributes) const {
237
237
}
238
238
239
239
Result ArticArchive::RenameDirectory (const Path& src_path, const Path& dest_path) const {
240
- cache_provider. ClearAllCache ();
240
+ cache_provider-> ClearAllCache ();
241
241
242
242
auto req = client->NewRequest (" FSUSER_RenameDirectory" );
243
243
@@ -376,8 +376,8 @@ ArticFileBackend::~ArticFileBackend() {
376
376
}
377
377
378
378
ResultVal<std::size_t > ArticFileBackend::Read (u64 offset, std::size_t length, u8* buffer) const {
379
- auto cache = cache_provider. ProvideCache (
380
- client, cache_provider. PathsToVector (archive.GetArchivePath (), file_path), true );
379
+ auto cache = cache_provider-> ProvideCache (
380
+ client, cache_provider-> PathsToVector (archive.GetArchivePath (), file_path), true );
381
381
382
382
if (cache != nullptr ) {
383
383
return cache->Read (file_handle, offset, length, buffer);
@@ -406,8 +406,8 @@ ResultVal<std::size_t> ArticFileBackend::Read(u64 offset, std::size_t length, u8
406
406
ResultVal<std::size_t > ArticFileBackend::Write (u64 offset, std::size_t length, bool flush,
407
407
bool update_timestamp, const u8* buffer) {
408
408
u32 flags = (flush ? 1 : 0 ) | (update_timestamp ? (1 << 8 ) : 0 );
409
- auto cache = cache_provider. ProvideCache (
410
- client, cache_provider. PathsToVector (archive.GetArchivePath (), file_path), true );
409
+ auto cache = cache_provider-> ProvideCache (
410
+ client, cache_provider-> PathsToVector (archive.GetArchivePath (), file_path), true );
411
411
if (cache != nullptr ) {
412
412
return cache->Write (file_handle, offset, length, buffer, flags);
413
413
} else {
@@ -434,8 +434,8 @@ ResultVal<std::size_t> ArticFileBackend::Write(u64 offset, std::size_t length, b
434
434
}
435
435
436
436
u64 ArticFileBackend::GetSize () const {
437
- auto cache = cache_provider. ProvideCache (
438
- client, cache_provider. PathsToVector (archive.GetArchivePath (), file_path), true );
437
+ auto cache = cache_provider-> ProvideCache (
438
+ client, cache_provider-> PathsToVector (archive.GetArchivePath (), file_path), true );
439
439
if (cache != nullptr ) {
440
440
auto res = cache->GetSize (file_handle);
441
441
if (res.Failed ())
0 commit comments