@@ -34,7 +34,7 @@ public static async Task<bool> IsArchiveEncrypted(BaseStorageFile archive)
34
34
return zipFile . ArchiveFileData . Any ( file => file . Encrypted || file . Method . Contains ( "Crypto" ) || file . Method . Contains ( "AES" ) ) ;
35
35
}
36
36
37
- public static async Task ExtractArchive ( BaseStorageFile archive , BaseStorageFolder destinationFolder , string password , IProgress < StatusCenterItemProgressModel > progress , CancellationToken cancellationToken )
37
+ public static async Task ExtractArchiveAsync ( BaseStorageFile archive , BaseStorageFolder destinationFolder , string password , IProgress < StatusCenterItemProgressModel > progress , CancellationToken cancellationToken )
38
38
{
39
39
using SevenZipExtractor ? zipFile = await GetZipFile ( archive , password ) ;
40
40
if ( zipFile is null )
@@ -148,7 +148,7 @@ public static async Task ExtractArchive(BaseStorageFile archive, BaseStorageFold
148
148
}
149
149
}
150
150
151
- private static async Task ExtractArchive ( BaseStorageFile archive , BaseStorageFolder ? destinationFolder , string password )
151
+ private static async Task ExtractArchiveAsync ( BaseStorageFile archive , BaseStorageFolder ? destinationFolder , string password )
152
152
{
153
153
if ( archive is null || destinationFolder is null )
154
154
return ;
@@ -159,7 +159,7 @@ private static async Task ExtractArchive(BaseStorageFile archive, BaseStorageFol
159
159
ReturnResult . InProgress ) ;
160
160
161
161
await FilesystemTasks . Wrap ( ( ) =>
162
- ExtractArchive ( archive , destinationFolder , password , banner . ProgressEventSource , banner . CancellationToken ) ) ;
162
+ ExtractArchiveAsync ( archive , destinationFolder , password , banner . ProgressEventSource , banner . CancellationToken ) ) ;
163
163
164
164
_statusCenterViewModel . RemoveItem ( banner ) ;
165
165
@@ -169,7 +169,7 @@ await FilesystemTasks.Wrap(() =>
169
169
ReturnResult . Success ) ;
170
170
}
171
171
172
- public static async Task DecompressArchive ( IShellPage associatedInstance )
172
+ public static async Task DecompressArchiveAsync ( IShellPage associatedInstance )
173
173
{
174
174
if ( associatedInstance == null )
175
175
return ;
@@ -212,13 +212,13 @@ public static async Task DecompressArchive(IShellPage associatedInstance)
212
212
destinationFolder = await FilesystemTasks . Wrap ( ( ) => parentFolder . CreateFolderAsync ( Path . GetFileName ( destinationFolderPath ) , CreationCollisionOption . GenerateUniqueName ) . AsTask ( ) ) ;
213
213
}
214
214
215
- await ExtractArchive ( archive , destinationFolder , password ) ;
215
+ await ExtractArchiveAsync ( archive , destinationFolder , password ) ;
216
216
217
217
if ( decompressArchiveViewModel . OpenDestinationFolderOnCompletion )
218
218
await NavigationHelpers . OpenPath ( destinationFolderPath , associatedInstance , FilesystemItemType . Directory ) ;
219
219
}
220
220
221
- public static async Task DecompressArchiveHere ( IShellPage associatedInstance )
221
+ public static async Task DecompressArchiveHereAsync ( IShellPage associatedInstance )
222
222
{
223
223
if ( associatedInstance == null )
224
224
return ;
@@ -229,7 +229,7 @@ public static async Task DecompressArchiveHere(IShellPage associatedInstance)
229
229
BaseStorageFile archive = await StorageHelpers . ToStorageItem < BaseStorageFile > ( selectedItem . ItemPath ) ;
230
230
BaseStorageFolder currentFolder = await StorageHelpers . ToStorageItem < BaseStorageFolder > ( associatedInstance . FilesystemViewModel . CurrentFolder . ItemPath ) ;
231
231
232
- if ( await FilesystemTasks . Wrap ( ( ) => DecompressHelper . IsArchiveEncrypted ( archive ) ) )
232
+ if ( await FilesystemTasks . Wrap ( ( ) => IsArchiveEncrypted ( archive ) ) )
233
233
{
234
234
DecompressArchiveDialog decompressArchiveDialog = new ( ) ;
235
235
DecompressArchiveDialogViewModel decompressArchiveViewModel = new ( archive )
@@ -247,11 +247,11 @@ public static async Task DecompressArchiveHere(IShellPage associatedInstance)
247
247
password = Encoding . UTF8 . GetString ( decompressArchiveViewModel . Password ) ;
248
248
}
249
249
250
- await ExtractArchive ( archive , currentFolder , password ) ;
250
+ await ExtractArchiveAsync ( archive , currentFolder , password ) ;
251
251
}
252
252
}
253
253
254
- public static async Task DecompressArchiveToChildFolder ( IShellPage associatedInstance )
254
+ public static async Task DecompressArchiveToChildFolderAsync ( IShellPage associatedInstance )
255
255
{
256
256
if ( associatedInstance == null )
257
257
return ;
@@ -284,7 +284,7 @@ public static async Task DecompressArchiveToChildFolder(IShellPage associatedIns
284
284
if ( currentFolder is not null )
285
285
destinationFolder = await FilesystemTasks . Wrap ( ( ) => currentFolder . CreateFolderAsync ( Path . GetFileNameWithoutExtension ( archive . Path ) , CreationCollisionOption . GenerateUniqueName ) . AsTask ( ) ) ;
286
286
287
- await ExtractArchive ( archive , destinationFolder , password ) ;
287
+ await ExtractArchiveAsync ( archive , destinationFolder , password ) ;
288
288
}
289
289
}
290
290
}
0 commit comments