return e.Op + " " + e.Old + " " + e.New + ": " + e.Err.Error()
}
-// Link creates a hard link.
+// Link creates newname as a hard link to the oldname file.
func Link(oldname, newname string) error {
e := syscall.Link(oldname, newname)
if e != nil {
return nil
}
-// Symlink creates a symbolic link.
+// Symlink creates newname as a symbolic link to oldname.
func Symlink(oldname, newname string) error {
e := syscall.Symlink(oldname, newname)
if e != nil {
return nil
}
-// Readlink reads the contents of a symbolic link: the destination of
-// the link. It returns the contents and an error, if any.
+// Readlink returns the destination of the named symbolic link.
// If there is an error, it will be of type *PathError.
func Readlink(name string) (string, error) {
for len := 128; ; len *= 2 {