1 ! Copyright (C) 2011 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators io.pathnames kernel sequences system
7 HOOK: find-native-bundle os ( string -- path )
9 HOOK: find-in-path* os ( string -- path/f )
11 HOOK: find-in-applications os ( directories filename -- path )
13 : find-in-path ( string -- path/f )
15 [ [ find-in-path* ] keep over [ append-path ] [ 2drop f ] if ]
19 { [ dup macosx? ] [ drop "io.standard-paths.macosx" require ] }
20 { [ dup unix? ] [ drop "io.standard-paths.unix" require ] }
21 { [ dup windows? ] [ drop "io.standard-paths.windows" require ] }