mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Added Runtime.FileSystem
This commit is contained in:
16
runtime_filesystem.go
Normal file
16
runtime_filesystem.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package wails
|
||||
|
||||
import homedir "github.com/mitchellh/go-homedir"
|
||||
|
||||
// RuntimeFileSystem exposes file system utilities to the runtime
|
||||
type RuntimeFileSystem struct {
|
||||
}
|
||||
|
||||
func newRuntimeFileSystem() *RuntimeFileSystem {
|
||||
return &RuntimeFileSystem{}
|
||||
}
|
||||
|
||||
// HomeDir returns the user's home directory
|
||||
func (r *RuntimeFileSystem) HomeDir() (string, error) {
|
||||
return homedir.Dir()
|
||||
}
|
||||
Reference in New Issue
Block a user