Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct fs.fsys usage #58

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions kernel/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ func (s *Service) Initialize() {
s.fsys = watchfs.New(mntfs)

// ensure basic system tree exists
fs.MkdirAll(s.fsys, "app", 0755)
fs.MkdirAll(s.fsys, "cmd", 0755)
fs.MkdirAll(s.fsys, "sys/app", 0755)
fs.MkdirAll(s.fsys, "sys/bin", 0755)
fs.MkdirAll(s.fsys, "sys/cmd", 0755)
fs.MkdirAll(s.fsys, "sys/dev", 0755)
fs.MkdirAll(s.fsys.FS, "app", 0755)
fs.MkdirAll(s.fsys.FS, "cmd", 0755)
fs.MkdirAll(s.fsys.FS, "sys/app", 0755)
fs.MkdirAll(s.fsys.FS, "sys/bin", 0755)
fs.MkdirAll(s.fsys.FS, "sys/cmd", 0755)
fs.MkdirAll(s.fsys.FS, "sys/dev", 0755)

devURL := fmt.Sprintf("%ssys/dev", js.Global().Get("hostURL").String())
resp, err := http.DefaultClient.Get(devURL)
Expand All @@ -70,8 +70,8 @@ func (s *Service) Initialize() {
}
}

s.fsys.MkdirAll("cmd/sauce", 0755)
fsutil.WriteFile(s.fsys, "cmd/sauce/main.go", []byte("package main\nimport \"fmt\"\nfunc main() {\n\tfmt.Println(\"Hello World!\")\n}"), 0644)
fs.MkdirAll(s.fsys.FS, "cmd/sauce", 0755)
fsutil.WriteFile(s.fsys.FS, "cmd/sauce/main.go", []byte("package main\nimport \"fmt\"\nfunc main() {\n\tfmt.Println(\"Hello World!\")\n}"), 0644)
Parzival-3141 marked this conversation as resolved.
Show resolved Hide resolved
}

func (s *Service) InitializeJS() {
Expand Down