This commit is contained in:
Sasha Koshka 2023-09-07 18:25:35 -04:00
parent c3c6ff61f5
commit 8a531986eb
1 changed files with 5 additions and 4 deletions

View File

@ -12,9 +12,10 @@ type FS struct {
path string
}
// FileWriter is a writable version of fs.File.
// FileWriter is a writable version of fs.File.
type FileWriter interface {
interface { fs.File; io.Writer }
fs.File
io.Writer
}
// ApplicationUserDataFS returns an FS that an application can use to store user
@ -54,11 +55,11 @@ func appFs (root string, app ApplicationDescription) (*FS, error) {
appname = strings.ReplaceAll(appname, "\\", "-")
path := filepath.Join(root, appname)
// ensure the directory actually exists
err := os.MkdirAll(path, 755)
if err != nil { return nil, err }
return &FS { path: path }, nil
}