Skip to content

Commit c2eaa49

Browse files
aykevldeadprogram
authored andcommitted
os: implement stub Chdir for non-OS systems
1 parent 3476100 commit c2eaa49

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/os/file_other.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ func NewFile(fd uintptr, name string) *File {
4242
return &File{&file{handle: stdioFileHandle(fd), name: name}}
4343
}
4444

45+
// Chdir changes the current working directory to the named directory.
46+
// If there is an error, it will be of type *PathError.
47+
func Chdir(dir string) error {
48+
return ErrNotImplemented
49+
}
50+
4551
// Rename renames (moves) oldpath to newpath.
4652
// If newpath already exists and is not a directory, Rename replaces it.
4753
// OS-specific restrictions may apply when oldpath and newpath are in different directories.

0 commit comments

Comments
 (0)