Skip to content

Commit 89f0700

Browse files
committed
WIP: provide stub for RemoveAll in wasi?
1 parent 4636fa6 commit 89f0700

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/os/path_other.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// +build baremetal js
2+
3+
// Copyright 2009 The Go Authors. All rights reserved.
4+
// Use of this source code is governed by a BSD-style
5+
// license that can be found in the LICENSE file.
6+
7+
package os
8+
9+
import (
10+
"syscall"
11+
)
12+
13+
// MkdirAll creates a directory named path,
14+
// along with any necessary parents, and returns nil,
15+
// or else returns an error.
16+
// The permission bits perm (before umask) are used for all
17+
// directories that MkdirAll creates.
18+
// If path is already a directory, MkdirAll does nothing
19+
// and returns nil.
20+
//func MkdirAll(path string, perm FileMode) error {
21+
// return &PathError{Op: "MkdirAll", Path: path, Err: syscall.ENOSYS}
22+
//}
23+
24+
// RemoveAll removes path and any children it contains.
25+
// It removes everything it can but returns the first error
26+
// it encounters. If the path does not exist, RemoveAll
27+
// returns nil (no error).
28+
// If there is an error, it will be of type *PathError.
29+
func RemoveAll(path string) error {
30+
return &PathError{Op: "RemoveAll", Path: path, Err: syscall.ENOSYS}
31+
}

0 commit comments

Comments
 (0)