Finished. Now for bug fixes
This commit is contained in:
+11
-2
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user