From ea27cd35fa07b874b3dff5d2f83dd401a361865e Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 29 Jan 2019 16:36:25 -0800 Subject: os: restore RemoveAll docs by making a single copy Updates #29983 Change-Id: Ifdf8aa9c92e053374e301a4268d85e277c15f0b5 Reviewed-on: https://go-review.googlesource.com/c/160182 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/os/path.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/os/path.go') diff --git a/src/os/path.go b/src/os/path.go index 30cc6c8b98..104b7ceaf7 100644 --- a/src/os/path.go +++ b/src/os/path.go @@ -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 == "." { -- cgit v1.3-5-g9baa