Add funcs in pkg/filesystem/util that can actually set file permissiosn

on Windows and update container log dir perms to 660 on Windows
This commit is contained in:
Mark Rossetti
2024-04-24 11:54:14 -07:00
parent 9b7a839bde
commit b377dfba0c
5 changed files with 300 additions and 8 deletions

View File

@@ -37,6 +37,16 @@ func IsUnixDomainSocket(filePath string) (bool, error) {
return true, nil
}
// Chmod is the same as os.Chmod on Unix.
func Chmod(name string, mode os.FileMode) error {
return os.Chmod(name, mode)
}
// MkdirAll is same as os.MkdirAll on Unix.
func MkdirAll(path string, perm os.FileMode) error {
return os.MkdirAll(path, perm)
}
// IsAbs is same as filepath.IsAbs on Unix.
func IsAbs(path string) bool {
return filepath.IsAbs(path)