]> Cypherpunks repositories - gostls13.git/commitdiff
os: restore RemoveAll docs by making a single copy
authorIan Lance Taylor <iant@golang.org>
Wed, 30 Jan 2019 00:36:25 +0000 (16:36 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 30 Jan 2019 01:39:37 +0000 (01:39 +0000)
Updates #29983

Change-Id: Ifdf8aa9c92e053374e301a4268d85e277c15f0b5
Reviewed-on: https://go-review.googlesource.com/c/160182
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/path.go
src/os/removeall_at.go
src/os/removeall_noat.go

index 30cc6c8b9841e2db83cf674977b87f99d5dda89a..104b7ceaf7dad37e58d852b954036ed9a790ba11 100644 (file)
@@ -58,6 +58,14 @@ func MkdirAll(path string, perm FileMode) error {
        return nil
 }
 
+// RemoveAll removes path and any children it contains.
+// It removes everything it can but returns the first error
+// it encounters. If the path does not exist, RemoveAll
+// returns nil (no error).
+func RemoveAll(path string) error {
+       return removeAll(path)
+}
+
 // endsWithDot reports whether the final component of path is ".".
 func endsWithDot(path string) bool {
        if path == "." {
index faee1287f112b6bb3fd3334c885cb1df59b3bb97..fe8b1faf2b3f222555803186a7c2537e8ed8408e 100644 (file)
@@ -13,7 +13,7 @@ import (
        "syscall"
 )
 
-func RemoveAll(path string) error {
+func removeAll(path string) error {
        if path == "" {
                // fail silently to retain compatibility with previous behavior
                // of RemoveAll. See issue 28830.
index 80527e227c9964cbb631db7cd42445bbf9c416b9..5a7dc263f08f29995bd3295ca56818b3869bf99f 100644 (file)
@@ -11,11 +11,7 @@ import (
        "syscall"
 )
 
-// RemoveAll removes path and any children it contains.
-// It removes everything it can but returns the first error
-// it encounters. If the path does not exist, RemoveAll
-// returns nil (no error).
-func RemoveAll(path string) error {
+func removeAll(path string) error {
        if path == "" {
                // fail silently to retain compatibility with previous behavior
                // of RemoveAll. See issue 28830.