summaryrefslogtreecommitdiff
path: root/src/lib/syscall/file_linux.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-04-13 16:50:42 -0700
committerRuss Cox <rsc@golang.org>2009-04-13 16:50:42 -0700
commit4948321bee7a9dfb635db68e40eacf5bed25ebd9 (patch)
treedfa3be7773ff2ad53a6a160053c27776f74dd2f2 /src/lib/syscall/file_linux.go
parentba30f377d90dd9152ce2fcda4e4960bd80c01fb6 (diff)
downloadgolang-4948321bee7a9dfb635db68e40eacf5bed25ebd9.tar.gz
lib misc
* exec.LookPath * flag.Args * os.Remove * strings.HasPrefix * strings.HasSuffix * syscall.Rmdir TBR=r DELTA=100 (100 added, 0 deleted, 0 changed) OCL=27373 CL=27392
Diffstat (limited to 'src/lib/syscall/file_linux.go')
-rw-r--r--src/lib/syscall/file_linux.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/syscall/file_linux.go b/src/lib/syscall/file_linux.go
index 9bf440884..80800b615 100644
--- a/src/lib/syscall/file_linux.go
+++ b/src/lib/syscall/file_linux.go
@@ -79,6 +79,12 @@ func Unlink(name string) (ret int64, errno int64) {
return r1, err;
}
+func Rmdir(name string) (ret int64, errno int64) {
+ namebuf := StringBytePtr(name);
+ r1, r2, err := Syscall(SYS_RMDIR, int64(uintptr(unsafe.Pointer(namebuf))), 0, 0);
+ return r1, err;
+}
+
func Fcntl(fd, cmd, arg int64) (ret int64, errno int64) {
r1, r2, err := Syscall(SYS_FCNTL, fd, cmd, arg);
return r1, err