summaryrefslogtreecommitdiff
path: root/libgo/go/os/file_plan9.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-03-02 16:38:43 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-03-02 16:38:43 +0000
commitcbb6491d76c7aa81cdf5d3b3a81386129c5e2fce (patch)
treeefa0c55763b34cbc633bc494c2743d1b5d9aaff3 /libgo/go/os/file_plan9.go
parentff2f581b00ac6759f6366c16ef902c935163aa13 (diff)
downloadgcc-cbb6491d76c7aa81cdf5d3b3a81386129c5e2fce.tar.gz
libgo: Update to weekly.2012-02-14 release.
From-SVN: r184798
Diffstat (limited to 'libgo/go/os/file_plan9.go')
-rw-r--r--libgo/go/os/file_plan9.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/libgo/go/os/file_plan9.go b/libgo/go/os/file_plan9.go
index 7d136eb3686..fed2b809175 100644
--- a/libgo/go/os/file_plan9.go
+++ b/libgo/go/os/file_plan9.go
@@ -76,7 +76,7 @@ func syscallMode(i FileMode) (o uint32) {
// or Create instead. It opens the named file with specified flag
// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
// methods on the returned File can be used for I/O.
-// It returns the File and an error, if any.
+// If there is an error, it will be of type *PathError.
func OpenFile(name string, flag int, perm FileMode) (file *File, err error) {
var (
fd int
@@ -181,6 +181,7 @@ func (f *File) Truncate(size int64) error {
const chmodMask = uint32(syscall.DMAPPEND | syscall.DMEXCL | syscall.DMTMP | ModePerm)
// Chmod changes the mode of the file to mode.
+// If there is an error, it will be of type *PathError.
func (f *File) Chmod(mode FileMode) error {
var d Dir
@@ -248,6 +249,7 @@ func (f *File) seek(offset int64, whence int) (ret int64, err error) {
// Truncate changes the size of the named file.
// If the file is a symbolic link, it changes the size of the link's target.
+// If there is an error, it will be of type *PathError.
func Truncate(name string, size int64) error {
var d Dir
d.Null()
@@ -261,6 +263,7 @@ func Truncate(name string, size int64) error {
}
// Remove removes the named file or directory.
+// If there is an error, it will be of type *PathError.
func Remove(name string) error {
if e := syscall.Remove(name); e != nil {
return &PathError{"remove", name, e}
@@ -269,6 +272,7 @@ func Remove(name string) error {
}
// Rename renames a file.
+// If there is an error, it will be of type *PathError.
func Rename(oldname, newname string) error {
var d Dir
d.Null()
@@ -282,6 +286,7 @@ func Rename(oldname, newname string) error {
}
// Chmod changes the mode of the named file to mode.
+// If there is an error, it will be of type *PathError.
func Chmod(name string, mode FileMode) error {
var d Dir