pkg/environment: Remove some file-based functions
This commit removes certain file-based functions from 'pkg/environment', continuing the migration to entirely remove the package.
This commit is contained in:
parent
39207a1cb5
commit
45540ab253
20 changed files with 52 additions and 120 deletions
|
|
@ -3,6 +3,7 @@ package unpack
|
|||
import (
|
||||
"io"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
|
||||
|
|
@ -80,7 +81,7 @@ func installResource(env environment.Environment, dst string, src string, fsys f
|
|||
|
||||
func installDir(env environment.Environment, dst string, srcInfo fs.FileInfo, srcFile fs.ReadDirFile, src string, fsys fs.FS, onInstallFile func(dst, src string)) error {
|
||||
// create the destination
|
||||
dstStat, dstErr := env.Stat(dst)
|
||||
dstStat, dstErr := os.Stat(dst)
|
||||
switch {
|
||||
case environment.IsNotExist(dstErr):
|
||||
if err := env.MkdirAll(dst, srcInfo.Mode()); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue