Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
62fe6914
Commit
62fe6914
authored
Feb 13, 2012
by
Gustavo Niemeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: clarify docs for link functions
R=golang-dev, bsiegert, r CC=golang-dev
https://golang.org/cl/5643068
parent
71c8b82d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
src/pkg/os/file_posix.go
src/pkg/os/file_posix.go
+3
-4
No files found.
src/pkg/os/file_posix.go
View file @
62fe6914
...
...
@@ -37,7 +37,7 @@ func (e *LinkError) Error() string {
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
{
...
...
@@ -46,7 +46,7 @@ func Link(oldname, newname string) error {
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
{
...
...
@@ -55,8 +55,7 @@ func Symlink(oldname, newname string) error {
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment