Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Classes/URKArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@ extern NSString *URKErrorDomain;
*/
+ (BOOL)urlIsARAR:(NSURL *)fileURL;

/**
* Lists the names/paths of the volume parts
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of NSString containing the paths of the volume parts, or nil if an error was encountered
*/
- (NSArray<NSString*> *)listVolumePaths:(NSError **)error;

/**
* Lists the names of the files in the archive
*
Expand Down
16 changes: 16 additions & 0 deletions Classes/URKArchive.mm
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,22 @@ + (BOOL)urlIsARAR:(NSURL *)fileURL

#pragma mark - Public Methods

- (NSArray<NSString*> *)listVolumePaths:(NSError **)error
{
__block NSMutableArray<NSString*> *volumePaths = [NSMutableArray new];

NSArray<URKFileInfo*> *listFileInfo = [self listFileInfo:error];

if (listFileInfo == nil)
return nil;

for (URKFileInfo* info in listFileInfo) {
if (![volumePaths containsObject:info.archiveName])
[volumePaths addObject:info.archiveName];
}

return [NSArray arrayWithArray:volumePaths];
}

- (NSArray<NSString*> *)listFilenames:(NSError **)error
{
Expand Down
Loading