]> gitweb.factorcode.org Git - factor.git/commitdiff
Update documentation for stat primitive
authorslava <slava@factorcode.org>
Tue, 14 Nov 2006 22:52:11 +0000 (22:52 +0000)
committerslava <slava@factorcode.org>
Tue, 14 Nov 2006 22:52:11 +0000 (22:52 +0000)
library/io/files.facts

index 7f5a76c72543eaf5d714cd06ad30ddb397d9cbcc..bf38e93a1acf41cfe7432002b66924f14d0f911d 100644 (file)
@@ -10,17 +10,12 @@ HELP: cd ( path -- )
 { $description "Changes the current working directory of the Factor process." }
 { $see-also cwd } ;
 
-HELP: stat ( path -- array/f )
-{ $values { "path" "a path name string" } { "array/f" "a four-element array or " { $link f } } }
+HELP: stat ( path -- directory? length permissions modified )
+{ $values { "path" "a path name string" } { "directory?" "boolean indicating if the file is a directory" } { "length" "the length in bytes as an integer" } { "permissions" "a Unix permission bitmap (0 on Windows" } { "the last modification time, as milliseconds since midnight, January 1st 1970 GMT" } }
 { $description
-    "If the file does not exist, outputs " { $link f } ". Otherwise, outputs a four-element array:"
-    { $list
-        "boolean indicating if the file is a directory"
-        "the length in bytes as an integer"
-        "a Unix permission bitmap (0 on Windows)"
-        "the last modification time, as milliseconds since midnight, January 1st 1970 GMT"
-    }
-} ;
+    "Queries the file system for file meta data. If the file does not exist, outputs " { $link f } " for all four values."
+}
+{ $see-also exists? directory? file-length file-modified } ;
 
 HELP: path+
 { $values { "str1" "a string" } { "str2" "a string" } { "str" "a string" } }