logger
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
type Extractor struct {
|
||||
params *Params
|
||||
Clean bool
|
||||
}
|
||||
|
||||
func NewExtractor(params *Params) *Extractor {
|
||||
@@ -13,3 +14,10 @@ func NewExtractor(params *Params) *Extractor {
|
||||
os.MkdirAll(params.TempPath, 0755)
|
||||
return &Extractor{params: params}
|
||||
}
|
||||
|
||||
func (e *Extractor) Cleanup() error {
|
||||
if e.Clean {
|
||||
os.RemoveAll(e.params.TempPath)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user