Skip to content

ROFLAN-INCORPORATED/RoflanArchives.Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RoflanArchives.Core

CodeLines ClosedMilestones ClosedIssues

NuGet Packages

Core library for working with roflan engine archive files (*.roflarc)


Code Examples

Pack a directory to the archive

var directoryPath = Console.ReadLine();
var fileName = Console.ReadLine();
var sourceDirectoryPath = Console.ReadLine();
var compressionType = Convert.ToByte(Console.ReadLine());
var compressionLevel = Convert.ToByte(Console.ReadLine());

var compressionTypeEnum = RoflanArchiveCompressionType.Default;

if (Enum.IsDefined(typeof(RoflanArchiveCompressionType), compressionType))
    compressionTypeEnum = (RoflanArchiveCompressionType)compressionType;

var sources = new[]
{
    new RoflanArchiveSourceDirectoryInfo(sourceDirectoryPath)
}

RoflanArchive.Pack(directoryPath, fileName, sources,
    compressionType, compressionLevel);

Open and load an existed archive

var filePath = Console.ReadLine();

var archive = RoflanArchive.Open(
    filePath);

Loading only one file from the archive (by id)

var filePath = Console.ReadLine();
var id = Convert.ToUInt32(Console.ReadLine());

var file = RoflanArchive.GetFile(
    filePath, id);

Loading only one file from the archive (by relative path)

var filePath = Console.ReadLine();
var relativePath = Console.ReadLine();

var file = RoflanArchive.GetFile(
    filePath, relativePath);

Unpack the archive to a directory

var filePath = Console.ReadLine();
var targetDirectoryPath = Console.ReadLine();

RoflanArchive.Unpack(filePath,
    targetDirectoryPath);

About

Core library for working with roflan engine archive files (*.roflarc)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors