22 Commits

Author SHA1 Message Date
Caleb Gardner 495d2345a4 File now implements os.FileInfo 2020-12-11 01:38:53 -06:00
Caleb Gardner c7593eaff3 Added Reader.ExtractTo for ease of use 2020-12-10 08:52:49 -06:00
Caleb Gardner 1da97137a5 Implemented #1
You can dereference a symlink when extracting.
2020-12-08 09:41:10 -06:00
Caleb Gardner e5d4d0902f Finished wildcard support.
Realized that path.Match works perfectly for my wildcard needs.
2020-12-07 10:41:45 -06:00
Caleb Gardner a894e2efb9 Removed XZ compression.
When testing the archlinux, xz compression couldn't seem to extract ANY files.
Testing extraction with the appimage works though. So that's good.
2020-12-02 01:56:24 -06:00
Caleb Gardner fef7bec20d Extracting is mostly finished.
Fixed reading metadata and data blocks that are the exactly correct size
2020-12-02 01:05:31 -06:00
Caleb Gardner e302d98665 Further work on extracting
Extracting files is threaded with goroutines.
Extracting also sets the proper UID and GUID
Made recursive children getting threaded with goroutines
Decided I will allow wildcards in paths. Hasn't been implemented though.
Fixed issues with ExtendedDirectory reading (I was using a uint16 instead of a uint32)
I couldn't test basically any of this. somehow a for loop isn't incrementing. For seemingly no reason.
2020-12-01 06:14:09 -06:00
Caleb Gardner c5c6291643 Some more work on ExtractTo
Added Xz compression support
Started testing using a big squashfs fil (particularly the squashfs from an Arch Linux install img)
2020-11-30 03:53:57 -06:00
Caleb Gardner 508a33b323 Starting work on ExtractTo from File
When using ExtractTo, will automatically set the correct permissions
Will also be able to extract folders
2020-11-29 15:55:06 -06:00
Caleb Gardner cea69188d4 Symlink file support
You can get the path that the symlink is pointing to, AND get the squashfs.File for it.
You can also now give a path FROM a given squashfs.File directory.
2020-11-28 02:22:48 -06:00
Caleb Gardner 23ec7ea6dd First version of File interface.
This will allow you to easily find and extract files.
Extraction of whole folders coming next. (Maybe)
2020-11-27 00:36:21 -06:00
Caleb Gardner 9471b93ead Working on a better API to interact with squashfs
New API uses a File that can hold more information.
2020-11-26 03:47:44 -06:00
Caleb Gardner b28b4ae978 Test now use a straight appimage.
Reads straight from the appimage instead of extracting the squashfs first
2020-11-25 12:12:16 -06:00
Caleb Gardner dcb26057fa Updated README 2020-11-25 08:57:18 -06:00
Caleb Gardner f0f32a2445 FILE EXTRACTION WORKS! 2020-11-25 04:26:48 -06:00
Caleb Gardner 4f058f2f31 Working on file reading (Not working right now) 2020-11-24 22:26:16 -06:00
Caleb Gardner 5761ad59cf Renamed BlockReader to MetadataReader (more correct)
SOME work on fragments (not working still...)
2020-11-23 16:50:00 -06:00
Caleb Gardner ae2cc5ab54 Working on fragments 2020-11-23 06:44:39 -06:00
Caleb Gardner fe0f4ef05f Working on reading data.
Set up go modules
2020-11-20 03:59:38 -06:00
Caleb Gardner 87ccd0f346 I CAN READ A DIRECTORY NOW
I've only tested it with the root dir, but should work for all directories.
2020-11-19 10:50:02 -06:00
Caleb Gardner be1be40a17 Further work on directory table reading 2020-11-18 22:24:26 -06:00
Caleb Gardner 7a2f9a87ba Re-wrote a bunch to try to figure out why things weren't working.
Turned out I was reading if a block was compressed exactly opposite.
Started to work more on looking up dirs.
2020-11-16 14:56:19 -06:00