Skip to content

jagdeep-manik/StormLib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

253 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StormLib

Fork of the original StormLib library, modified to have an Objective-C API.

Installation

  • (TODO) Support Carthage
  • Note: Ensure "App Sandbox" is OFF

Example

- (void)stormArchiveExample
{
    NSError *error = nil;
    
    /// Open Archive
    StormArchive *archive = [[StormArchive alloc] initWithArchive:@"/Users/someone/Desktop/MyMap.w3x" flags:0 error:&error];
    if (!archive)
    {
        NSLog(@"%@", error);
        return;
    }
    
    /// Extract File
    [archive extractFile:@"war3map.j" pathOnDisk:@"/Users/someone/Desktop/war3map.j" error:&error];
    if (error)
    {
        NSLog(@"%@", error);
        return;
    }
    
    /// Find All Files
    NSArray<NSDictionary *> *findResults = [archive findFilesMatching:@"*" error:&error];
    if (error)
    {
        NSLog(@"%@", error);
        return;
    }
    
    /// Print All File Names
    for (result in findResults)
    {
        NSLog(@"%@", result["PlainName"]);
    }
    
    /// Close Archive
    [archive close:&error];
}

About

Fork of the StormLib library (by Ladislav Zezula), written with Objective-C mappings.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C 53.0%
  • C++ 31.3%
  • Objective-J 14.6%
  • Other 1.1%