1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00
mxpv-podsync/pkg/ytdl/temp_file.go
2020-04-19 13:19:31 -07:00

22 lines
289 B
Go

package ytdl
import (
"os"
log "github.com/sirupsen/logrus"
)
type tempFile struct {
*os.File
dir string
}
func (f *tempFile) Close() error {
err := f.File.Close()
err1 := os.RemoveAll(f.dir)
if err1 != nil {
log.Errorf("could not remove temp dir: %v", err1)
}
return err
}