] ($block)
] unless-empty ;
+: describe-metadata-files ( vocab -- )
+ vocab-metadata-files [ <pathname> ] map [
+ "Meta-data files" $heading
+ [
+ files.
+ ] ($block)
+ ] unless-empty ;
+
: describe-tuple-classes ( classes -- )
[
"Tuple classes" $subheading
[ describe-metadata ]
[ describe-words ]
[ describe-files ]
+ [ describe-metadata-files ]
[ describe-children ]
} cleave ;
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: combinators io.directories io.files io.pathnames kernel
-make sequences vocabs.loader ;
+make sequences splitting vocabs vocabs.loader ;
IN: vocabs.files
: vocab-tests-path ( vocab -- path/f )
] [ f ] if* ;
: vocab-tests ( vocab -- paths )
+ vocab-name ".private" ?tail drop
[
[ vocab-tests-path [ dup exists? [ , ] [ drop ] if ] when* ]
[ vocab-tests-dir % ] bi
M: unsupported-platform summary
drop "Current operating system not supported by this vocabulary" ;
+: exists?, ( path -- )
+ [ dup exists? [ , ] [ drop ] if ] when* ;
+
+: vocab-metadata-files ( vocab -- paths )
+ [
+ {
+ [ vocab-summary-path exists?, ]
+ [ vocab-authors-path exists?, ]
+ [ vocab-tags-path exists?, ]
+ [ vocab-platforms-path exists?, ]
+ [ vocab-resources-path exists?, ]
+ } cleave
+ ] { } make ;
+
[
dup vocab-platforms dup supported-platform?
[ 2drop ] [ [ vocab-name ] dip throw-unsupported-platform ] if
swap find-vocab-root [ prepend-path ] [ drop f ] if* ;
: vocab-source-path ( vocab -- path/f )
+ vocab-name ".private" ?tail drop
dup ".factor" append-vocab-dir vocab-append-path ;
: vocab-docs-path ( vocab -- path/f )
+ vocab-name ".private" ?tail drop
dup "-docs.factor" append-vocab-dir vocab-append-path ;
SYMBOL: load-help?