Jan 28, 2017 10:26 AM
(This post was last modified: Jan 28, 2017 10:50 AM by Barret.)
Project
Source of custom archiver with GUI
Dependencies
https://github.com/TheBarret/HeaderKit
![[Image: I7fKyG7.png]](https://i.imgur.com/I7fKyG7.png)
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*)
Search by filename, returns true if results are found
(Match can be wildcard pattern *abc*)
The resolver is a more direct approach to locate an entity, returns true if a result has been found
Each 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.
Entity properties
Base properties
Directory properties
File entity properties
Github link: https://github.com/TheBarret/Archiver
Notice that the github project is subject to get updates or/and changes
Source of custom archiver with GUI
Dependencies
https://github.com/TheBarret/HeaderKit
![[Image: I7fKyG7.png]](https://i.imgur.com/I7fKyG7.png)
Bare bone features
- Pack and Unpack using GZip
- Header integrity check (Using the Header project)
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 String
Public ReadOnly Property Guid As String
Public ReadOnly Property Created As DateTime
Public ReadOnly Property Type As EntityType
Public ReadOnly Property Path As StringDirectory properties
Code
Public ReadOnly Property Parent As Entity
Public Property Content As List(Of Entity)File entity properties
Code
Public ReadOnly Property Content As Byte()
Public ReadOnly Property Parent As Entity
Public ReadOnly Property Checksum As UInt32Github link: https://github.com/TheBarret/Archiver
Notice that the github project is subject to get updates or/and changes

