mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
16 lines
255 B
Go
16 lines
255 B
Go
package utils
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
func ChownR(path string, uid, gid int) error {
|
|
return filepath.Walk(path, func(name string, info os.FileInfo, err error) error {
|
|
if err == nil {
|
|
err = os.Chown(name, uid, gid)
|
|
}
|
|
return err
|
|
})
|
|
}
|