]> gitweb.factorcode.org Git - factor.git/blob - basis/io/files/info/info-docs.factor
Merge branch 'master' into experimental
[factor.git] / basis / io / files / info / info-docs.factor
1 USING: help.markup help.syntax arrays io.files ;
2 IN: io.files.info
3
4 HELP: file-info
5 { $values { "path" "a pathname string" } { "info" file-info } }
6 { $description "Queries the file system for metadata. If " { $snippet "path" } " refers to a symbolic link, it is followed. See the article " { $link "file-types" } " for a list of metadata symbols." }
7 { $errors "Throws an error if the file does not exist." } ;
8
9 HELP: link-info
10 { $values { "path" "a pathname string" } { "info" "a file-info tuple" } }
11 { $description "Queries the file system for metadata. If path refers to a symbolic link, information about the symbolic link itself is returned. If the file does not exist, an exception is thrown." } ;
12
13 { file-info link-info } related-words
14
15 HELP: directory?
16 { $values { "file-info" file-info } { "?" "a boolean" } }
17 { $description "Tests if " { $snippet "file-info" } " is a directory." } ;
18
19 HELP: file-systems
20 { $values { "array" array } }
21 { $description "Returns an array of " { $link file-system-info } " objects returned by iterating the mount points and calling " { $link file-system-info } " on each." } ;
22
23 HELP: file-system-info
24 { $values
25 { "path" "a pathname string" }
26 { "file-system-info" file-system-info } }
27 { $description "Returns a platform-specific object describing the file-system that contains the path. The cross-platform slot is " { $slot "free-space" } "." } ;
28
29 ARTICLE: "io.files.info" "File system meta-data"
30 "File meta-data:"
31 { $subsection file-info }
32 { $subsection link-info }
33 { $subsection exists? }
34 { $subsection directory? }
35 "File types:"
36 { $subsection "file-types" }
37 "File system meta-data:"
38 { $subsection file-system-info }
39 { $subsection file-systems } ;
40
41 ABOUT: "io.files.info"