aboutsummaryrefslogtreecommitdiff
path: root/src/lib/os/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/os/file.go')
-rw-r--r--src/lib/os/file.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/os/file.go b/src/lib/os/file.go
index 3010deeab7..48daf0bce4 100644
--- a/src/lib/os/file.go
+++ b/src/lib/os/file.go
@@ -261,3 +261,9 @@ func (file *File) Readdir(count int) (dirs []Dir, err *os.Error) {
return
}
+// Chdir changes the current working directory to the named directory.
+func Chdir(dir string) *os.Error {
+ r, e := syscall.Chdir(dir);
+ return ErrnoToError(e);
+}
+