What???
This commit is contained in:
parent
c3c6ff61f5
commit
8a531986eb
9
path.go
9
path.go
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue