Finished. Now for bug fixes

This commit is contained in:
Caleb Gardner
2023-12-24 18:20:05 -06:00
parent 5de59627df
commit d9132ab6a4
6 changed files with 385 additions and 20 deletions
+11 -2
View File
@@ -3,19 +3,28 @@ package squashfs
import (
"io"
"io/fs"
"os"
"github.com/CalebQ42/squashfs/internal/routinemanager"
)
type ExtractionOptions struct {
LogOutput io.Writer //Where error log should write.
manager *routinemanager.Manager
LogOutput io.Writer //Where the verbose log should write. Defaults to os.Stdout.
DereferenceSymlink bool //Replace symlinks with the target file.
UnbreakSymlink bool //Try to make sure symlinks remain unbroken when extracted, without changing the symlink.
Verbose bool //Prints extra info to log on an error.
IgnorePerm bool //Ignore file's permissions and instead use Perm.
Perm fs.FileMode //Permission to use when IgnorePerm. Defaults to 0777.
SimultaneousFiles uint16 //Number of files to process in parallel. Defaults to 10.
ExtractionRoutines uint16 //Number of goroutines to use for each file's extraction. Only applies to regular files. Defaults to 10.
}
func DefaultOptions() *ExtractionOptions {
return &ExtractionOptions{
Perm: 0777,
LogOutput: os.Stdout,
Perm: 0777,
SimultaneousFiles: 10,
ExtractionRoutines: 10,
}
}