1 ! Copyright (C) 2011 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators io.pathnames kernel sequences system
4 vocabs vocabs.platforms ;
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 HOOK: find-in-standard-login-path* os ( string -- path/f )
15 M: object find-in-standard-login-path*
18 : find-in-path ( string -- path/f )
20 [ find-in-path* ] keep over
21 [ append-path ] [ 2drop f ] if
24 : ?find-in-path ( string -- path/string )
25 [ find-in-path ] [ or ] bi ;
27 : find-in-standard-login-path ( string -- path/f )
29 [ find-in-standard-login-path* ] keep over
30 [ append-path ] [ 2drop f ] if
33 USE-MACOSX: io.standard-paths.macosx
34 USE-UNIX: io.standard-paths.unix
35 USE-WINDOWS: io.standard-paths.windows