]> gitweb.factorcode.org Git - factor.git/blob - basis/io/files/links/links-docs.factor
Merge branch 'master' into experimental
[factor.git] / basis / io / files / links / links-docs.factor
1 USING: help.markup help.syntax io.files.info math ;
2 IN: io.files.links
3
4 HELP: make-link
5 { $values { "target" "a path to the symbolic link's target" } { "symlink" "a path to new symbolic link" } }
6 { $description "Creates a symbolic link." } ;
7
8 HELP: read-link
9 { $values { "symlink" "a path to an existing symbolic link" } { "path" "the path pointed to by the symbolic link" } }
10 { $description "Reads the symbolic link and returns its target path." } ;
11
12 HELP: copy-link
13 { $values { "target" "a path to an existing symlink" } { "symlink" "a path to a new symbolic link" } }
14 { $description "Copies a symbolic link without following the link." } ;
15
16 HELP: follow-link
17 { $values
18      { "path" "a pathname string" }
19      { "path'" "a pathname string" }
20 }
21 { $description "Returns an absolute path from " { $link read-link } "." } ;
22
23 HELP: follow-links
24 { $values
25      { "path" "a pathname string" }
26      { "path'" "a pathname string" }
27 }
28 { $description "Follows a chain of symlinks up to " { $link symlink-depth } "." } ;
29
30 { read-link follow-link follow-links } related-words
31
32 HELP: symlink-depth
33 { $values
34      { "value" integer }
35 }
36 { $description "The number of redirections " { $link follow-links } " will follow." } ;
37
38 HELP: too-many-symlinks
39 { $values
40      { "path" "a pathname string" } { "n" integer }
41 }
42 { $description "An error thrown when the number of redirections in a chain of symlinks surpasses the value in the " { $link symlink-depth } " variable." } ;
43
44 ARTICLE: "io.files.links" "Symbolic links"
45 "Reading links:"
46 { $subsection read-link }
47 { $subsection follow-link }
48 { $subsection follow-links }
49 "Creating links:"
50 { $subsection make-link }
51 "Copying links:"
52 { $subsection copy-link }
53 "Not all operating systems support symbolic links."
54 { $see-also link-info } ;
55
56 ABOUT: "io.files.links"