![]() |
|
[.NET] Create your own custom (Un)Zip archiver with GUI - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Create your own custom (Un)Zip archiver with GUI (/showthread.php?tid=5536318) |
Create your own custom (Un)Zip archiver with GUI - Barret - Jan 28, 2017 Project Source of custom archiver with GUI Dependencies https://github.com/TheBarret/HeaderKit ![]() Bare bone features
How does it work? I simply started to make a base class called 'entity' then on top of it i defined my file or directory classes that would hold info about the item it harbors, such as ID, type ,checksum and creation date. These entities are build in a tree structure and hold a parent property, this way we can search recursively. Find/Locate and Extract methods: Search by generated unique id, returns true if results are found (Match can be wildcard pattern *abc*) Code Public Function FindByGuid(match As String, ByRef result As List(Of Entity)) As BooleanSearch by filename, returns true if results are found (Match can be wildcard pattern *abc*) Code Public Function FindByName(match As String, ByRef result As List(Of Entity)) As BooleanThe resolver is a more direct approach to locate an entity, returns true if a result has been found Code Public Function TryResolve(path As String, ByRef result As Entity) As BooleanEach entity has its own extractTo function, you can extract all or just a single entity, keep in mind that the extractor expects the same folder output if a single entity is extracted. Code Public Function ExtractTo(Directory As String, Optional Overwrite As Boolean = False) As BooleanEntity properties Base properties Code Public ReadOnly Property Name As StringDirectory properties Code Public ReadOnly Property Parent As EntityFile entity properties Code Public ReadOnly Property Content As Byte()Github link: https://github.com/TheBarret/Archiver Notice that the github project is subject to get updates or/and changes * - log dot zip - Jan 28, 2017 Another awesome release, good demonstration of your header lib. Good stuff. Keep it up! |