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