]> gitweb.factorcode.org Git - factor.git/commitdiff
io.files: exists? -> file-exists? and rename primitive.
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 20 Dec 2021 21:06:16 +0000 (15:06 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 20 Dec 2021 21:15:58 +0000 (15:15 -0600)
Fixes #2507

82 files changed:
basis/alien/libraries/finder/macosx/macosx.factor
basis/alien/libraries/finder/windows/windows.factor
basis/bootstrap/image/download/download.factor
basis/bootstrap/image/primitives/primitives.factor
basis/command-line/command-line.factor
basis/editors/visual-studio-code/visual-studio-code.factor
basis/ftp/server/server.factor
basis/globs/globs.factor
basis/gobject-introspection/gobject-introspection.factor
basis/help/html/html.factor
basis/http/client/client.factor
basis/http/server/static/static.factor
basis/io/directories/directories-tests.factor
basis/io/directories/directories.factor
basis/io/directories/unix/unix.factor
basis/io/files/info/info-docs.factor
basis/io/files/info/info.factor
basis/io/files/links/unix/unix.factor
basis/io/files/temp/macosx/macosx.factor
basis/io/files/unique/unique-tests.factor
basis/io/files/windows/windows-tests.factor
basis/io/launcher/unix/unix-tests.factor
basis/io/monitors/monitors-tests.factor
basis/io/monitors/recursive/recursive-tests.factor
basis/io/sockets/secure/openssl/openssl.factor
basis/io/standard-paths/unix/unix.factor
basis/io/standard-paths/windows/windows.factor
basis/logging/parser/parser.factor
basis/logging/server/server.factor
basis/tools/completion/completion.factor
basis/tools/deploy/backend/backend.factor
basis/tools/deploy/macosx/macosx.factor
basis/tools/deploy/windows/windows.factor
basis/tools/scaffold/scaffold.factor
basis/tools/which/which.factor
basis/ui/backend/gtk/gtk.factor
basis/vocabs/files/files.factor
basis/vocabs/hierarchy/hierarchy.factor
basis/vocabs/metadata/metadata.factor
basis/vocabs/refresh/monitor/monitor.factor
basis/vocabs/refresh/refresh.factor
core/bootstrap/stage1.factor
core/io/files/files-docs.factor
core/io/files/files-tests.factor
core/io/files/files.factor
core/parser/parser.factor
core/source-files/source-files.factor
core/vocabs/loader/loader.factor
extra/c/preprocessor/preprocessor.factor
extra/combinators/extras/extras-tests.factor
extra/cpu/8080/emulator/emulator.factor
extra/fastcgi/fastcgi.factor
extra/gdbm/gdbm-docs.factor
extra/gdbm/gdbm-tests.factor
extra/gdbm/gdbm.factor
extra/gemini/cli/cli.factor
extra/gemini/server/server.factor
extra/geo-ip/geo-ip.factor
extra/git/git.factor
extra/gopher/server/server.factor
extra/graphviz/graphviz-tests.factor
extra/graphviz/render/render.factor
extra/io/files/acls/macosx/macosx.factor
extra/io/files/trash/unix/unix.factor
extra/machine-learning/data-sets/data-sets.factor
extra/mason/cleanup/cleanup.factor
extra/mason/git/git.factor
extra/mason/release/tidy/tidy.factor
extra/mason/report/report-tests.factor
extra/modern/paths/paths.factor
extra/project-euler/041/041.factor
extra/protocols/tftp/tftp.factor
extra/rosetta-code/text-processing/max-licenses/max-licenses.factor
extra/terminfo/terminfo.factor
extra/tldr/tldr.factor
extra/tools/cat/cat.factor
extra/tools/copy/copy.factor
extra/tools/image-analyzer/graphviz/graphviz-tests.factor
extra/tools/image-analyzer/image-analyzer-tests.factor
extra/webapps/imagebin/imagebin.factor
extra/webapps/mason/docs-update/docs-update.factor
misc/vim/syntax/factor/generated.vim

index 795539f455443bd72b6196fca54b353ed8678e1f..0ff1c8457ab8f392714f9da8611d7460a81c4461 100644 (file)
@@ -122,7 +122,7 @@ PRIVATE>
 : dyld-find ( name -- path/f )
     dyld-search-paths [
         {
-            { [ dup exists? ] [ file-info regular-file? ] }
+            { [ dup file-exists? ] [ file-info regular-file? ] }
             { [ use-dyld-shared-cache? ] [ _dyld_shared_cache_contains_path ] }
             [ drop f ]
         } cond
index e9a5202ce230bf6d32d99de0b393a48caf507d3c..4c6586f719168780a210f92a94a47f9fc4660e28 100644 (file)
@@ -32,7 +32,7 @@ IN: alien.libraries.finder.windows
 
 : find-library-paths ( name -- path/f )
     candidate-paths [
-        { [ exists? ] [ file-info regular-file? ] } 1&&
+        { [ file-exists? ] [ file-info regular-file? ] } 1&&
     ] find nip ;
 
 : find-library-file ( name -- path/f )
index e554e2aade218d2b4dc9c85bf3804bee359fef75..ccef1a0c128c2829fbf1b08bc8ba93464affd034 100644 (file)
@@ -17,7 +17,7 @@ CONSTANT: url URL" http://downloads.factorcode.org/images/master/"
     download-checksums at ;
 
 : need-new-image? ( image -- ? )
-    dup exists?
+    dup file-exists?
     [ [ file-checksum ] [ download-checksum ] bi = not ]
     [ drop t ]
     if ;
index bdb095375839792c72d690ba4ae5c4c064cf6537..f9c9bc7680e85efd016e7381b6e079cb6417537c 100644 (file)
@@ -220,7 +220,7 @@ CONSTANT: all-primitives {
     {
         "io.files.private"
         {
-            { "(exists?)" ( path -- ? ) "existsp" { string } { object } f }
+            { "(file-exists?)" ( path -- ? ) "existsp" { string } { object } f }
         }
     }
     {
index a90f7f5ad1c369d388b994639fc06d20cbd7fb35..18ffec89255bd797af5e0f5e85d0fb1137c2d2b7 100644 (file)
@@ -41,7 +41,7 @@ SYMBOL: command-line
 
 : load-vocab-roots ( -- )
     "user-init" get [
-        "~/.factor-roots" dup exists? [
+        "~/.factor-roots" dup file-exists? [
             utf8 file-lines harvest [ add-vocab-root ] each
         ] [ drop ] if
         "roots" get [
index 45c819c2e89961ffe6a796854ce04b76715cade8..ebf633559c8a010ac896adbeb6190946fe2514a8 100644 (file)
@@ -21,7 +21,7 @@ M: visual-studio-code find-visual-studio-code-path
                 [ "Code" which ]
                 [ home "VSCode-linux-x64/Code" append-path ]
                 [ "/usr/share/code/code" ]
-            } [ dup exists? [ drop f ] unless ] map-compose 0|| ] }
+            } [ dup file-exists? [ drop f ] unless ] map-compose 0|| ] }
         { macosx [
             "com.microsoft.VSCode" find-native-bundle
             [ "Contents/MacOS/Electron" append-path ] [ f ] if* ] }
index 72f1ad542028654ee74ff7eee24609b14f632144..65ec841e9ee9818f87baa3a417ef7900fbfab642 100644 (file)
@@ -66,11 +66,11 @@ C: <ftp-disconnect> ftp-disconnect
     resolve-symlinks server get serving-directory>> head? ;
 
 : can-serve-directory? ( path -- ? )
-    { [ exists? ] [ file-info directory? ] [ serving? ] } 1&& ;
+    { [ file-exists? ] [ file-info directory? ] [ serving? ] } 1&& ;
 
 : can-serve-file? ( path -- ? )
     {
-        [ exists? ]
+        [ file-exists? ]
         [ file-info regular-file? ]
         [ serving? ]
     } 1&& ;
index e2bbb99aee166b23647785fda508e9fecd9fc872..21cc9eab7546acca32fd320a1c160d7810c19c22 100644 (file)
@@ -123,7 +123,7 @@ DEFER: glob%
 :: glob-literal% ( root globs -- )
     globs unclip :> ( remaining glob )
 
-    root glob append-path dup exists? [
+    root glob append-path dup file-exists? [
         remaining over file-info ?glob%
     ] [
         drop
index 23fb5541c7aca063d3a4589106d6edc33193d4c4..ae90e73e0517db984dc9d1b8f60affa490226613 100644 (file)
@@ -33,11 +33,11 @@ M: gir-not-found summary
     ] { } make ;
 
 :: resolve-gir-path ( path -- path )
-    path exists?
+    path file-exists?
     [ path ] [
         current-vocab-dirs custom-gir-dirs system-gir-dirs
         3append sift :> paths
-        paths [ path append-path exists? ] find nip
+        paths [ path append-path file-exists? ] find nip
         [ path append-path ] [ path paths gir-not-found ] if*
     ] if ;
 
index c18e91025aabfea4cd681ba4b06b0a229acf825b..c9e6981e068747bc1016976440f0db6c201531e7 100644 (file)
@@ -145,7 +145,7 @@ M: pathname url-of
     "@2x" over subseq? [ "." split1-last "@2x." glue ] unless ;
 
 : ?copy-file ( from to -- )
-    dup exists? [ 2drop ] [ copy-file ] if ;
+    dup file-exists? [ 2drop ] [ copy-file ] if ;
 
 : cache-images ( body -- body' )
     dup [
index 3b8e30642aecf202ea520974eeb0cf475a9056eb..14077dc6239d4e66dc12397da1d85771d80d5ecd 100644 (file)
@@ -283,7 +283,7 @@ PRIVATE>
     ] with-file-writer ;
 
 : ?download-to ( url file -- )
-    dup exists? [ 2drop ] [ download-to ] if ;
+    dup file-exists? [ 2drop ] [ download-to ] if ;
 
 : download ( url -- )
     dup download-name download-to ;
index c05c6f1d5d1ca6e1e50d1d134b06e2a3806c10ce..d594bfd35ee6c9825b3177ac34f41b299c5e789a 100644 (file)
@@ -160,7 +160,7 @@ TUPLE: file-responder root hook special index-names allow-listings ;
 
 : find-index ( filename -- path )
     file-responder get index-names>>
-    [ append-path dup exists? [ drop f ] unless ] with map-find
+    [ append-path dup file-exists? [ drop f ] unless ] with map-find
     drop ;
 
 : serve-directory ( filename -- response )
@@ -173,7 +173,7 @@ TUPLE: file-responder root hook special index-names allow-listings ;
     ] if ;
 
 : serve-object ( filename -- response )
-    serving-path dup exists?
+    serving-path dup file-exists?
     [ dup file-info directory? [ serve-directory ] [ serve-file ] if ]
     [ drop <404> ]
     if ;
index 8b8d038569c04f3c39aa90ef056fd2d27a7126ac..2f2d95ff13fb7761413a37c355116da8e8ffd30e 100644 (file)
@@ -25,10 +25,10 @@ tools.test ;
 [
     { t t f } [
         "blahblah" make-directory
-        "blahblah" exists?
+        "blahblah" file-exists?
         "blahblah" file-info directory?
         "blahblah" delete-directory
-        "blahblah" exists?
+        "blahblah" file-exists?
     ] unit-test
 
     { "file1 contents" } [
@@ -84,8 +84,8 @@ tools.test ;
     { } [ "test-foo.txt" delete-file ] unit-test
     { } [ "test-bar.txt" delete-file ] unit-test
 
-    { f } [ "test-foo.txt" exists? ] unit-test
-    { f } [ "test-bar.txt" exists? ] unit-test
+    { f } [ "test-foo.txt" file-exists? ] unit-test
+    { f } [ "test-bar.txt" file-exists? ] unit-test
 
     { } [ "test-blah" make-directory ] unit-test
 
@@ -94,13 +94,13 @@ tools.test ;
     ] unit-test
 
     { t } [
-        "test-blah/fooz" exists?
+        "test-blah/fooz" file-exists?
     ] unit-test
 
     { } [ "test-blah/fooz" delete-file ] unit-test
     { } [ "test-blah" delete-directory ] unit-test
 
-    { f } [ "test-blah" exists? ] unit-test
+    { f } [ "test-blah" file-exists? ] unit-test
 
     { } [ "delete-tree-test/a/b/c" make-directories ] unit-test
 
@@ -164,14 +164,14 @@ tools.test ;
     { f t } [
         "foo" [ make-directories ] keep
         [
-            "bar" exists?
+            "bar" file-exists?
             vm-path "-e=USE: io.directories \"bar\" touch-file" 2array try-output-process
-            "bar" exists?
+            "bar" file-exists?
         ] with-directory
     ] unit-test
 
     { t } [
-        "one/two/three" make-parent-directories parent-directory exists?
+        "one/two/three" make-parent-directories parent-directory file-exists?
     ] unit-test
 
 ] with-test-directory
index ce07a215b4be755efabb8c26cbeaba7c9c09ea8f..11c000b229ea85998128eeb540a68c3cf709b6df 100644 (file)
@@ -27,7 +27,7 @@ DEFER: make-parent-directories
         [ "." = ]
         [ root-directory? ]
         [ empty? ]
-        [ exists? ]
+        [ file-exists? ]
     } 1|| [
         make-parent-directories
         dup make-directory
index 65c1eea8ee94552f2114fa2e3552554fe78f6c2f..798f64d6195e53eda4356a521593d1425e3cd403 100644 (file)
@@ -13,7 +13,7 @@ CONSTANT: mkdir-mode flags{ USER-ALL GROUP-ALL OTHER-ALL } ! 0o777
 
 M: unix touch-file
     normalize-path
-    dup exists? [ touch ] [
+    dup file-exists? [ touch ] [
         touch-mode file-mode open-file close-file
     ] if ;
 
index e40681f174c51fb00be37798b11e59e608c5f233..c405cce1f538568bd90140f7312d20edc94d215e 100644 (file)
@@ -67,7 +67,7 @@ ARTICLE: "io.files.info" "File system metadata"
 { $subsections
     file-info
     link-info
-    exists?
+    file-exists?
     directory?
     regular-file?
     symbolic-link?
index b920fc2435084f97a28b3e63726806bd8c6dfe32..a329835e09b034cba4a30dc898fcf679d57d7b30 100644 (file)
@@ -12,12 +12,12 @@ accessed ;
 HOOK: file-info os ( path -- info )
 
 : ?file-info ( path -- info/f )
-    dup exists? [ file-info ] [ drop f ] if ;
+    dup file-exists? [ file-info ] [ drop f ] if ;
 
 HOOK: link-info os ( path -- info )
 
 : ?link-info ( path -- info/f )
-    dup exists? [ link-info ] [ drop f ] if ;
+    dup file-exists? [ link-info ] [ drop f ] if ;
 
 <PRIVATE
 
index 456ae95193290e3570eba818bf629b9732fb59bc..18e5a9c4f4899e051da7b54d7cf238332d208e3f 100644 (file)
@@ -15,4 +15,4 @@ M: unix read-link
 
 M: unix resolve-symlinks
     path-components "/"
-    [ append-path dup exists? [ follow-links ] when ] reduce ;
+    [ append-path dup file-exists? [ follow-links ] when ] reduce ;
index 07451b2f8b272e4e5a40f86db3f26509f117f2c9..95fb2abb660293925758bd55205dda65a370b0bf 100644 (file)
@@ -27,7 +27,7 @@ CONSTANT: factor-bundle-name "org.factorcode.Factor"
     factor-bundle-name append-path ;
 
 : first-existing ( paths -- path )
-    [ exists? ] find nip
+    [ file-exists? ] find nip
     [ "no user cache directory found" throw ] unless* ; inline
 
 PRIVATE>
index 1a67edef8cf66a40dbdb96c289383c047e7bca67..1ae9431967c9e3991217d27702f61c00f9338a31 100644 (file)
@@ -32,7 +32,7 @@ io.pathnames kernel namespaces sequences strings tools.test ;
 { t } [
     [
         [ ] with-unique-directory
-        [ exists? ] [ delete-tree ] bi
+        [ file-exists? ] [ delete-tree ] bi
     ] with-temp-directory
 ] unit-test
 
index d8784bdd111b6907598e69f62b79a9b040f98926..c8003ac9ecd7256e1f8986b269e7840a270a0bcd 100644 (file)
@@ -58,7 +58,7 @@ io.files.unique destructors ;
 ] unit-test
 
 [ "c:\\blah" ] [ "c:\\foo\\bar" "\\blah" append-path ] unit-test
-[ t ] [ "" resource-path 2 tail exists? ] unit-test
+[ t ] [ "" resource-path 2 tail file-exists? ] unit-test
 
 ! win32-file-attributes
 {
index 4e34966f106d0e92d3877e21aaf5ebb351034924..67aeee610e659670662cca018a6fb162adc1845a 100644 (file)
@@ -8,7 +8,7 @@ IN: io.launcher.unix.tests
 [
     { } [ { "touch" "launcher-test-1" } try-process ] unit-test
 
-    { t } [ "launcher-test-1" exists? ] unit-test
+    { t } [ "launcher-test-1" file-exists? ] unit-test
 
     { } [
         "launcher-test-1" ?delete-file
index ec250293cb1e085d1a042bd8f19bd3caeb0c39d8..6fab7383e53ea0e8393d3bedc6ca0fcfba320b21 100644 (file)
@@ -11,18 +11,18 @@ sequences threads tools.test ;
         { } [ "a2" make-directory ] unit-test
         { } [ "a1" "a2" move-file-into ] unit-test
 
-        { t } [ "a2/a1" exists? ] unit-test
+        { t } [ "a2/a1" file-exists? ] unit-test
 
         { } [ "a2/a1/a3.txt" touch-file ] unit-test
 
-        { t } [ "a2/a1/a3.txt" exists? ] unit-test
+        { t } [ "a2/a1/a3.txt" file-exists? ] unit-test
 
         { } [ "a2/a1/a4.txt" touch-file ] unit-test
         { } [ "a2/a1/a5.txt" touch-file ] unit-test
         { } [ "a2/a1/a4.txt" delete-file ] unit-test
         { } [ "a2/a1/a5.txt" "a2/a1/a4.txt" move-file ] unit-test
 
-        { t } [ "a2/a1/a4.txt" exists? ] unit-test
+        { t } [ "a2/a1/a4.txt" file-exists? ] unit-test
 
         { } [ "m" get dispose ] unit-test
     ] with-monitors
index 0217314f55c4fadf0a70b0dff055d53c2f954826..fd632c5925204255db4dd701199ebe15420c0705 100644 (file)
@@ -18,7 +18,7 @@ M: dummy-monitor dispose*
 
 M: mock-io-backend (monitor)
     nip
-    over exists? [
+    over file-exists? [
         dummy-monitor new-monitor
         dummy-monitor-created get [ 1 + ] change-i drop
     ] [
index daa9ebb6f19059bde09040291a2ad607c82e2150..ac3e0d179ef47b316fe3b10663198a8e102ebe7b 100644 (file)
@@ -74,7 +74,7 @@ PRIVATE>
 ERROR: file-expected path ;
 
 : ensure-exists ( path -- path )
-    dup exists? [ file-expected ] unless ; inline
+    dup file-exists? [ file-expected ] unless ; inline
 
 : ssl-file-path ( path -- path' )
     absolute-path ensure-exists ;
index 107f28a05af946cd7065e84a1e15dfd0c639ac5f..288f9106d33f614d681284e15ce95eb3064a272f 100644 (file)
@@ -8,7 +8,7 @@ IN: io.standard-paths.unix
 
 M: unix find-in-path*
     [ "PATH" os-env ":" split ] dip
-    '[ _ append-path exists? ] find nip ;
+    '[ _ append-path file-exists? ] find nip ;
 
 ! iterm2 spews some terminal info on every bash command.
 : parse-login-paths ( seq -- strings )
@@ -21,4 +21,4 @@ M: unix find-in-path*
     binary <process-reader> stream-contents parse-login-paths ;
 
 M: unix find-in-standard-login-path*
-    [ standard-login-paths ] dip '[ _ append-path exists? ] find nip ;
+    [ standard-login-paths ] dip '[ _ append-path file-exists? ] find nip ;
index eaab8c64ee94debbb02b681498f08d3937a5afc4..b98d327b32dd132d9e7d2752672c8bffe215aa60 100644 (file)
@@ -24,4 +24,4 @@ M: windows find-in-applications
 
 M: windows find-in-path*
     [ "PATH" os-env ";" split ] dip
-    '[ _ append-path exists? ] find nip ;
+    '[ _ append-path file-exists? ] find nip ;
index ecff2ef1d2fa826510a3237276025f81ca358f75..84d762b24434e06329fc10f17b4170e826c7f5c8 100644 (file)
@@ -81,7 +81,7 @@ PEG: parse-log-line ( string -- entry ) log-line-parser ;
     ] { } make ;
 
 : parse-log-file ( service -- entries )
-    log-path 1 log# dup exists?
+    log-path 1 log# dup file-exists?
     [ utf8 file-lines parse-log ] [ drop f ] if ;
 
 GENERIC: log-timestamp. ( date -- )
index de0cdd2b57ff27d7bb739903673ad7daf8cd78fc..00cbf874002cadafafe1566256a5d27ba8f4e1c5 100644 (file)
@@ -72,7 +72,7 @@ CONSTANT: keep-logs 10
     keep-logs log# ?delete-file ;
 
 : ?move-file ( old new -- )
-    over exists? [ move-file ] [ 2drop ] if ;
+    over file-exists? [ move-file ] [ 2drop ] if ;
 
 : advance-log ( path n -- )
     [ 1 - log# ] 2keep log# ?move-file ;
index cebfcdb8674b580c2abe83eff04cbe7aec60ccc6..f5fe0836a3b57031c908057be80bfbe209608981 100644 (file)
@@ -122,7 +122,7 @@ PRIVATE>
 
 : paths-matching ( str -- seq )
     dup last-path-separator [ 1 + cut ] [ drop "" ] if swap
-    dup { [ exists? ] [ file-info directory? ] } 1&&
+    dup { [ file-exists? ] [ file-info directory? ] } 1&&
     [ directory-paths completions ] [ 2drop { } ] if ;
 
 <PRIVATE
index 597449625bfa1b7bd11e9ab743a502993c732a11..042ad38272c5fbae7a08b890e397d5ffedab6ae8 100644 (file)
@@ -43,7 +43,7 @@ ERROR: can't-deploy-library-file library ;
 
 : make-boot-image ( -- )
     ! If stage1 image doesn't exist, create one.
-    my-boot-image-name resource-path exists?
+    my-boot-image-name resource-path file-exists?
     [ make-my-image ] unless ;
 
 : staging-image-name ( profile -- name )
@@ -77,7 +77,7 @@ ERROR: can't-deploy-library-file library ;
     ] { } make ;
 
 : make-staging-image ( profile -- )
-    { } [ suffix ] accumulate* [ staging-image-name exists? ] reject
+    { } [ suffix ] accumulate* [ staging-image-name file-exists? ] reject
     [ staging-command-line ] map
     [ vm-path swap run-factor ] each ;
 
index 2b6a8e3a09543dbfdfcfcab2f1a6cb3d3ab344ef..3e0a502af3b250c0db15547bf2c7767cea7bbe1e 100644 (file)
@@ -49,7 +49,7 @@ IN: tools.deploy.macosx
     vocab-dir "icon.icns" append-path ;
 
 : copy-icns ( vocab bundle-name -- icon? )
-    swap dup vocab-mac-icon-path vocab-append-path dup exists?
+    swap dup vocab-mac-icon-path vocab-append-path dup file-exists?
     [ swap "Contents/Resources/Icon.icns" append-path copy-file t ]
     [ 2drop f ] if ;
 
@@ -74,7 +74,7 @@ IN: tools.deploy.macosx
     [ % "/Contents/Resources/" % % ".image" % ] "" make ;
 
 : deploy-app-bundle ( vocab -- )
-    bundle-name dup exists? [ delete-tree ] [ drop ] if
+    bundle-name dup file-exists? [ delete-tree ] [ drop ] if
     [ bundle-name create-app-dir ] keep
     [ bundle-name deploy.app-image-name ] keep
     namespace make-deploy-image
index 9286fb505da6a99184037aad7255bdb17fd1cb38..f7e370e83184dc6252ea51d1f6920e4a1a3e21c8 100644 (file)
@@ -21,7 +21,7 @@ CONSTANT: app-icon-resource-id "APPICON"
     vocab-dir "icon.ico" append-path ;
 
 : embed-ico ( vm-path vocab -- )
-    dup vocab-windows-icon-path vocab-append-path dup exists?
+    dup vocab-windows-icon-path vocab-append-path dup file-exists?
     [ binary file-contents app-icon-resource-id embed-icon-resource ]
     [ 2drop ] if ;
 
index 48be516a25ed9fed02bcf2db302eaa1d3943df1f..1d3fe34f4abc87319e5ff94f94df1c34a1d64122 100644 (file)
@@ -59,7 +59,7 @@ ERROR: vocab-must-not-exist string ;
 
 : scaffold-directory ( vocab-root vocab -- )
     vocab-root/vocab>path
-    dup exists? [ directory-exists ] [ make-directories ] if ;
+    dup file-exists? [ directory-exists ] [ make-directories ] if ;
 
 : not-scaffolding ( path -- path )
     "Not creating scaffolding for " write dup <pathname> . ;
@@ -68,7 +68,7 @@ ERROR: vocab-must-not-exist string ;
     "Creating scaffolding for " write dup <pathname> . ;
 
 : scaffolding? ( path -- path ? )
-    dup exists? [ not-scaffolding f ] [ scaffolding t ] if ;
+    dup file-exists? [ not-scaffolding f ] [ scaffolding t ] if ;
 
 : scaffold-copyright ( -- )
     "! Copyright (C) " write now year>> number>string write
index 407700221900fdcea5684db20416df8c5d55a831..ee4fdb92f30bdd30254f0542be48be34d2742cb0 100644 (file)
@@ -11,7 +11,7 @@ IN: tools.which
 
 : executable? ( path -- ? )
     {
-        [ exists? ]
+        [ file-exists? ]
         [ file-executable? ]
         [ file-info directory? not ]
     } 1&& ;
index 3446ff22f484c9c676603c9e865d7e022c5416bb..c9a46f99ea17cbad15dff37d2b9ff3dd983f02a5 100644 (file)
@@ -186,7 +186,7 @@ icon-data [ default-icon-data ] initialize
     dup vocab-dir { "icon.png" "icon.ico" } [
         append-path vocab-append-path
     ] 2with map default-icon-path suffix
-    [ exists? ] find nip binary file-contents ;
+    [ file-exists? ] find nip binary file-contents ;
 
 : load-icon ( -- )
     icon-data get [
index 96bef7788bc568e8a20f49b1e2ee3338f19c9edd..2203de21c07d18dd7211c7f42b8de02fcc80f344 100644 (file)
@@ -9,7 +9,7 @@ IN: vocabs.files
 
 : vocab-tests-dir ( vocab -- paths )
     dup vocab-dir "tests" append-path vocab-append-path [
-        dup exists? [
+        dup file-exists? [
             dup directory-files [ ".factor" tail? ] filter
             [ append-path ] with map
         ] [ drop f ] if
@@ -18,7 +18,7 @@ IN: vocabs.files
 : vocab-tests ( vocab -- paths )
     vocab-name ".private" ?tail drop
     [
-        [ vocab-tests-path [ dup exists? [ , ] [ drop ] if ] when* ]
+        [ vocab-tests-path [ dup file-exists? [ , ] [ drop ] if ] when* ]
         [ vocab-tests-dir % ] bi
     ] { } make ;
 
index 4ba44cc56ddcccebd5dd29d397718022ca0cb9c1..f1edacca3584753f3a777a1fa19e2992b379ab72 100644 (file)
@@ -30,14 +30,14 @@ ERROR: vocab-root-required root ;
 
 : vocab-directory-entries ( root prefix -- vocab-path vocab-name entries )
     ensure-vocab-root/prefix [ vocab-dir append-path ] keep
-    over dup exists? [ directory-entries ] [ drop { } ] if ;
+    over dup file-exists? [ directory-entries ] [ drop { } ] if ;
 
 : (disk-vocabs) ( root prefix -- seq )
     vocab-directory-entries visible-dirs [
         name>>
         [ dup ".factor" append append-path append-path ]
         [ over empty? [ nip ] [ "." glue ] if ] bi-curry bi*
-        swap exists? [ >vocab-link ] [ <vocab-prefix> ] if
+        swap file-exists? [ >vocab-link ] [ <vocab-prefix> ] if
     ] 2with map ;
 
 DEFER: add-vocab%
index 30c37998a0a82b23e1b6283df51145a4048c2cd4..adbc1d46245ead4e9e8a32b7cd36cc227dbc74b1 100644 (file)
@@ -15,7 +15,7 @@ IN: vocabs.metadata
 
 MEMO: vocab-file-lines ( vocab name -- lines/f )
     vocab-file-path dup [
-        dup exists? [
+        dup file-exists? [
             utf8 file-lines harvest
         ] [
             drop f
@@ -98,17 +98,17 @@ TUPLE: unsupported-platform vocab requires ;
 M: unsupported-platform summary
     drop "Current operating system not supported by this vocabulary" ;
 
-: exists?, ( path -- )
-    [ dup exists? [ , ] [ drop ] if ] when* ;
+: file-exists?, ( path -- )
+    [ dup file-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?, ]
+            [ vocab-summary-path file-exists?, ]
+            [ vocab-authors-path file-exists?, ]
+            [ vocab-tags-path file-exists?, ]
+            [ vocab-platforms-path file-exists?, ]
+            [ vocab-resources-path file-exists?, ]
         } cleave
     ] { } make ;
 
index 7e668daac1eab2b35f59e21279b7b4de96553815..26e77eee91d7b6ae2a305f9088949682a98d65fd 100644 (file)
@@ -44,7 +44,7 @@ TR: convert-separators "/\\" ".." ;
     ] [ monitor-loop ] bi ;
 
 : (start-vocab-monitor) ( vocab-root -- )
-    dup exists?
+    dup file-exists?
     [ [ t <monitor> monitor-loop ] with-monitors ] [ drop ] if ;
 
 : start-vocab-monitor ( vocab-root -- )
index 948f2b1ac3596ec4925d521eb5bd90ccc63d9f27..8de0f4892b272a508a8b2e8cecac829ca452eab5 100644 (file)
@@ -8,14 +8,14 @@ IN: vocabs.refresh
 : source-modified? ( path -- ? )
     dup source-files get at [
         dup path>>
-        dup exists? [
+        dup file-exists? [
             utf8 file-lines crc32 checksum-lines
             swap checksum>> = not
         ] [
             2drop f
         ] if
     ] [
-        exists?
+        file-exists?
     ] ?if ;
 
 SYMBOL: changed-vocabs
index 3404b8154ae07d2c895d38a6353a1afd9df6dafa..54fef16d629c03274f342a4ed87d20c629b5e1ad 100644 (file)
@@ -45,7 +45,7 @@ load-help? off
         init-resource-path
 
         "resource:basis/bootstrap/stage2.factor"
-        dup exists? [
+        dup file-exists? [
             run-file
         ] [
             "Cannot find " write write "." print
index 91a0fcab9d5b10213cb86e3e97dc28d4f6301a4f..afbba2ad3227f353ff7fd0416e6499dab0096601 100644 (file)
@@ -111,6 +111,6 @@ HELP: file-contents
 
 { set-file-lines file-lines change-file-lines set-file-contents file-contents change-file-contents } related-words
 
-HELP: exists?
+HELP: file-exists?
 { $values { "path" "a pathname string" } { "?" boolean } }
 { $description "Tests if the file named by " { $snippet "path" } " exists." } ;
index f87cd6eb82392abaa94410ff05a08b59740c4251..2bcb67a977337f96108947dbaad8351c45ba22e3 100644 (file)
@@ -160,7 +160,7 @@ CONSTANT: pt-array-1
 
     { } [ "test.txt" "test2.txt" move-file ] unit-test
 
-    { t } [ "test2.txt" exists? ] unit-test
+    { t } [ "test2.txt" file-exists? ] unit-test
 
     { } [ "test2.txt" delete-file ] unit-test
 ] with-test-directory
index 798d6d7dcefd4ab3cbff191e7c652c8bd63948bd..4c859b68f2e86ee187eff3b527d4de28e7a7b970 100644 (file)
@@ -6,7 +6,7 @@ splitting system ;
 IN: io.files
 
 <PRIVATE
-PRIMITIVE: (exists?) ( path -- ? )
+PRIMITIVE: (file-exists?) ( path -- ? )
 PRIVATE>
 
 SYMBOL: +retry+ ! just try the operation again without blocking
@@ -70,8 +70,10 @@ HOOK: (file-appender) io-backend ( path -- stream )
 : with-file-appender ( path encoding quot -- )
     [ <file-appender> ] dip with-output-stream ; inline
 
-: exists? ( path -- ? )
-    normalize-path native-string>alien (exists?) ;
+: file-exists? ( path -- ? )
+    normalize-path native-string>alien (file-exists?) ;
+
+ALIAS: exists? file-exists?
 
 ! Current directory
 <PRIVATE
index a6ddb9beb6d38e5005805ccba4328209c9e7b851..be7fdb106a129d90e56727b871e421691b9c1820 100644 (file)
@@ -246,6 +246,6 @@ print-use-hook [ [ ] ] initialize
     parse-file call( -- ) ;
 
 : ?run-file ( path -- )
-    dup exists? [ run-file ] [ drop ] if ;
+    dup file-exists? [ run-file ] [ drop ] if ;
 
 ERROR: version-control-merge-conflict ;
index d3eb3022150b3c561a747f79d6635db05fcada11..9be7a8602ee2f9b24835029393e24def58b38b21 100644 (file)
@@ -33,7 +33,7 @@ main ;
 
 : reset-checksums ( -- )
     source-files get [
-        over exists? [
+        over file-exists? [
             [ utf8 file-lines ] dip record-checksum
         ] [ 2drop ] if
     ] assoc-each ;
index ad2f998ef49011d81edf030d7d353d6e5bf506f4..a1a5d9603ee275a4c5db1438de6c49aada6a3ba8 100644 (file)
@@ -34,7 +34,7 @@ ERROR: not-found-in-roots path ;
 <PRIVATE
 
 : find-root-for ( path -- path/f )
-    vocab-roots get [ prepend-path exists? ] with find nip ;
+    vocab-roots get [ prepend-path file-exists? ] with find nip ;
 
 M: string vocab-path
     dup find-root-for [ prepend-path ] [ not-found-in-roots ] if* ;
index 1a128c57b339c6e2e3be8c49a17c0a4e1eac5c2b..22c7f0fb381fbf380ea988f60d75a7d306769809 100644 (file)
@@ -49,7 +49,7 @@ ERROR: header-file-missing path ;
 
 :: read-standard-include ( preprocessor-state path -- )
     preprocessor-state dup library-paths>>
-    [ path append-path exists? ] find nip
+    [ path append-path file-exists? ] find nip
     [
         dup [
             path append-path
@@ -61,7 +61,7 @@ ERROR: header-file-missing path ;
     ] if* ;
 
 : read-local-include ( preprocessor-state path -- )
-    dup exists? [ preprocess-file ] [ 2drop ] if ;
+    dup file-exists? [ preprocess-file ] [ 2drop ] if ;
 
 : skip-whitespace/comments ( sequence-parser -- sequence-parser )
     skip-whitespace
index 50fed8261c774142d8bfb359a3a2e852ed01de41..5f1bdee9b7e9bebd191883cc2099bfec28894370 100644 (file)
@@ -34,9 +34,9 @@ splitting tools.test ;
 { "123" "1" } [ "1" "123" [ length ] [ < ] swap-when ] unit-test
 
 
-{ t } [ "resource:" [ exists? ] ?1arg >boolean ] unit-test
-{ f } [ f [ exists? ] ?1arg ] unit-test
-{ f } [ "/homeasdfasdf123123" [ exists? ] ?1arg ] unit-test
+{ t } [ "resource:" [ file-exists? ] ?1arg >boolean ] unit-test
+{ f } [ f [ file-exists? ] ?1arg ] unit-test
+{ f } [ "/homeasdfasdf123123" [ file-exists? ] ?1arg ] unit-test
 
 { "hi " "there" } [
     "hi there" {
index 8df417e207b69e81df142d38d62416de9d106b2e..5cbec86c999128a42c448dcf3a827f9fee800ea9 100644 (file)
@@ -453,7 +453,7 @@ SYMBOL: rom-root
 
 : rom-dir ( -- string )
     rom-root get [
-        home "roms" append-path dup exists? [ drop f ] unless
+        home "roms" append-path dup file-exists? [ drop f ] unless
     ] unless* ;
 
 : load-rom* ( seq cpu -- )
index d02d89728c51592c32f6e5113cf8f4a215cec86b..271451ca38dae8fa641862c5c1eac8133d9538be 100644 (file)
@@ -86,7 +86,7 @@ ENUM: fcgi-protocol-status
     ] loop ;
 
 : delete-if-exists ( file -- )
-    dup exists? [ delete-file ] [ drop ] if ;
+    dup file-exists? [ delete-file ] [ drop ] if ;
 
 : make-local-socket ( socket-path -- socket )
     [ delete-if-exists ] keep
index db38308ad779583fcf6bff85998d1581c6fe5855..15e3c0b6d43e38b08ecafbcd4fe94bbe98ca449a 100644 (file)
@@ -39,7 +39,7 @@ HELP: gdbm-error-message
 { $values { "error" gdbm-error } { "msg" string } }
 { $description "Returns error message in human readable format." } ;
 
-HELP: exists?
+HELP: file-exists?
 { $values { "key" object } { "?" boolean } }
 { $description "Searches for a particular key without retreiving it." } ;
 
@@ -133,7 +133,7 @@ $nl
 "All interaction with gdbm database should be realized using special combinator which automates all work for database initialisation and cleanup. All initialisation options are passed to combinator with a database configuration object."
 { $subsections gdbm <gdbm> with-gdbm }
 "For actual record manipulation the following words are used:"
-{ $subsections insert exists? fetch delete }
+{ $subsections insert file-exists? fetch delete }
 
 { $heading "Sequential access" }
 "It is possible to iterate through all records in the database with"
index f6782a35e8d74497ea301c68f9ee451eb06f04a1..1f6fea7508bc2ff45a7d92d791bde5606eb64133 100644 (file)
@@ -18,7 +18,7 @@ CLEANUP
     test.db reader >>role [ ] with-gdbm
 ] [ gdbm-file-open-error = ] must-fail-with
 
-{ f } [ [ "foo" exists? ] with-test.db ] unit-test
+{ f } [ [ "foo" file-exists? ] with-test.db ] unit-test
 
 { } [ [ "foo" 41 insert ] with-test.db ] unit-test
 
@@ -57,7 +57,7 @@ os macosx? [
 
 { f }
 [
-    test.db newdb >>role [ "foo" exists? ] with-gdbm
+    test.db newdb >>role [ "foo" file-exists? ] with-gdbm
 ] unit-test
 
 CLEANUP
index f92d243a56ec161bd63120007d443f679eb37f27..d05e1ee9eaa9ef6e5fddc75be538cc69977f978c 100644 (file)
@@ -137,7 +137,7 @@ PRIVATE>
 
 : synchronize ( -- ) dbf gdbm_sync ;
 
-: exists? ( key -- ? )
+: file-exists? ( key -- ? )
     [ dbf swap object>datum gdbm_exists c-bool> ]
     with-destructors ;
 
index 34b1fa0af21933612dbfa998b9fc0313299a8a49..de6291800c8ed7aef523b0564fc33a6c86626fd9 100644 (file)
@@ -124,7 +124,7 @@ CONSTANT: URL V{ }
     ] when* ;
 
 : gemini-less ( -- )
-    "gemini.txt" temp-file dup exists? [
+    "gemini.txt" temp-file dup file-exists? [
         "less" swap 2array try-process
     ] [ drop ] if ;
 
@@ -141,7 +141,7 @@ CONSTANT: URL V{ }
     URL ?first [ >url "/" >>path gemini-go ] when* ;
 
 : gemini-shell ( args -- )
-    "|" split "gemini.txt" temp-file dup exists? [
+    "|" split "gemini.txt" temp-file dup file-exists? [
         "cat" swap 2array prefix run-pipeline drop
     ] [ 2drop ] if ;
 
index 318183b1a77b1078cbc8760632a2c59f571324bf..977c3b9e9a617d156fed6f74bef618eb6797627c 100644 (file)
@@ -73,11 +73,11 @@ TUPLE: gemini-server < threaded-server
     ] with-directory-entries ;
 
 : send-directory ( server path -- )
-    dup ".geminimap" append-path dup exists? [
+    dup ".geminimap" append-path dup file-exists? [
         send-file 2drop
     ] [
         drop dup ".geminihead" append-path
-        dup exists? [ send-file ] [ drop ] if
+        dup file-exists? [ send-file ] [ drop ] if
         list-directory
     ] if ;
 
index 4da5894179a07ba61f89bdc2788628c5bad202d8..cf814e5c5ebbf574ccbeb13c8e7d4da0a6e54074 100644 (file)
@@ -11,7 +11,7 @@ IN: geo-ip
 CONSTANT: db-url "http://software77.net/geo-ip/?DL=1"
 
 : download-db ( -- path )
-    db-path dup exists? [
+    db-path dup file-exists? [
         db-url over ".gz" append download-to
         { "gunzip" } over ".gz" append absolute-path suffix try-process
     ] unless ;
index 570555828208b20aa496019da71380ff113e4ab0..80278f322ffbc303be650b0393d80881a7241cf7 100644 (file)
@@ -60,7 +60,7 @@ ERROR: expected-one-line lines ;
     [ first ] [ expected-one-line ] if ;
 
 : git-unpacked-object-exists? ( hash -- ? )
-    make-object-path exists? ;
+    make-object-path file-exists? ;
 
 TUPLE: index-entry ctime mtime dev ino mode uid gid size sha1 flags name ;
 CONSTRUCTOR: <index-entry> index-entry ( ctime mtime dev ino mode uid gid size sha1 flags name -- obj ) ;
index b6f28aeb641339bdbaada0c4a6374c67e9f23222..5eb6b403e003972a215acdb35640c627d705e4b8 100644 (file)
@@ -83,11 +83,11 @@ TUPLE: gopher-server < threaded-server
     ] with-directory-entries ;
 
 : send-directory ( server path -- )
-    dup ".gophermap" append-path dup exists? [
+    dup ".gophermap" append-path dup file-exists? [
         send-file 2drop
     ] [
         drop dup ".gopherhead" append-path
-        dup exists? [ send-file ] [ drop ] if
+        dup file-exists? [ send-file ] [ drop ] if
         list-directory
     ] if ;
 
index 70be570456b80edd394eb3c12348cfd452e0b50e..03f4710f6f77ef97e6c4bf9d5461e1d21ec8c3ad 100644 (file)
@@ -51,7 +51,7 @@ SYMBOLS: supported-layouts supported-formats ;
     ] with-test-directory ;
 
 : preview-smoke-test ( graph -- pass? )
-    [ exists? ] with-preview ;
+    [ file-exists? ] with-preview ;
 
 : K_n ( n -- graph )
     <graph>
index ddbba2e7720a843c62c56d2e979a833353c48a99..4f2ed5a84a553e3a229856be9f56e7aa67901784 100644 (file)
@@ -72,7 +72,7 @@ M: cannot-find-graphviz-installation summary
     [ unsupported-encoding ] unless ;
 
 : ?delete-file ( path -- )
-    dup exists? [ delete-file ] [ drop ] if ;
+    dup file-exists? [ delete-file ] [ drop ] if ;
 
 PRIVATE>
 
index c26be9572ccafca5517c8832258b786c643b5aee..b7dbc4b3f15b5a3d5abfe7e06172dab4c1af86e4 100644 (file)
@@ -25,7 +25,7 @@ IN: io.files.acls.macosx
     clear-errno
     ACL_TYPE_EXTENDED acl_get_file dup [
         errno ENOENT = [
-            [ path exists? ] preserve-errno
+            [ path file-exists? ] preserve-errno
             [ drop f ] [ throw-errno ] if
         ] [
             throw-errno
index 730de60c0f15c65bc13a8577ba4ee352dbaad100..ce1f7a920af3fdd9e6e3d7493cc6099f70a6a36d 100644 (file)
@@ -44,7 +44,7 @@ IN: io.files.trash.unix
     top-directory dup trash-home top-directory = [
         drop trash-home
     ] [
-        dup ".Trash" append-path exists?
+        dup ".Trash" append-path file-exists?
         [ trash-1 ] [ trash-2 ] if
         [ make-user-directory ] keep
     ] if ;
@@ -57,7 +57,7 @@ IN: io.files.trash.unix
     ] dip swap "%s%s %s%s" sprintf ;
 
 : safe-file-name ( path -- path' )
-    dup 0 [ over exists? ] [
+    dup 0 [ over file-exists? ] [
         [ parent-directory to-directory ] [ 1 + ] bi*
         [ (safe-file-name) ] keep
     ] while drop nip ;
index 2d38cb4c39717087b15c3dbe1f9e6f226cc1e44d..0770d1a0b10ff01e30d137218b6659582c01aec5 100644 (file)
@@ -68,7 +68,7 @@ PRIVATE>
 : download-to-directory ( url directory -- )
     dup make-directories
     [
-        dup { [ download-name exists? ] [ file-stem exists? ] } 1|| [
+        dup { [ download-name file-exists? ] [ file-stem file-exists? ] } 1|| [
             drop
         ] [
             download
@@ -107,7 +107,7 @@ PRIVATE>
             "http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz"
         }
         [ [ "resource:datasets/" download-to-directory ] parallel-each ]
-        [ [ dup file-stem exists? [ drop ] [ file-name gzip-decompress-file ] if ] each ]
+        [ [ dup file-stem file-exists? [ drop ] [ file-name gzip-decompress-file ] if ] each ]
         [ [ file-stem binary file-contents ] map ] tri
         first4 {
             [ mnist-data>array ]
index 2b42de1bbe069c5d7ed0b7f83d88133b238482e8..18281991416050a597f21b497cb56b018eae7bac 100644 (file)
@@ -5,7 +5,7 @@ mason.config mason.platform namespaces ;
 IN: mason.cleanup
 
 : compress ( filename -- )
-    dup exists? [
+    dup file-exists? [
         "bzip2" swap 2array short-running-process
     ] [ drop ] if ;
 
index 1d3c88503df56b28ace9eeb91534f121bd9d8862..6cdcd5fe8a8505b75c1bf23cceb2f7270102d955 100644 (file)
@@ -78,7 +78,7 @@ PRIVATE>
 
 : git-clone-or-pull ( -- id )
     ! Must be run from builds-dir.
-    "factor" exists? [
+    "factor" file-exists? [
         check-repository [
             "factor" [
                 [ git-pull-cmd short-running-process ]
index ed791b36d7e42214e4c02e56562675d19a0fce47..5e8724b9f6b135c98e2b974ecdb90c865ac4c5ef 100644 (file)
@@ -34,6 +34,6 @@ CONSTANT: cleanup-list {
 : tidy ( -- )
     "factor" [
         useless-files
-        [ exists? ] filter
+        [ file-exists? ] filter
         [ delete-tree ] each
     ] with-directory ;
index 6f5efe3c1b795e7fb30129a42392cb9f00162428..9cdd1e327098f141b95fbff1919f82e098cf3cb8 100644 (file)
@@ -5,7 +5,7 @@ IN: mason.report.tests
 { 0 0 } [ [ ] with-report ] must-infer-as
 
 : verify-report ( -- )
-     [ t ] [ "report" exists? ] unit-test
+     [ t ] [ "report" file-exists? ] unit-test
      [ ] [ "report" file>xml drop ] unit-test
      [ ] [ "report" delete-file ] unit-test ;
 
index a6e46ebde0e92b6c954b0454c6f0bd70042b7988..b43526d68e54694da90917d541f12a00c05d1b0c 100644 (file)
@@ -43,7 +43,7 @@ CONSTANT: core-broken-vocabs
         extra-vocabs
     ] { } append-outputs-as ;
 
-: filter-exists ( seq -- seq' ) [ exists? ] filter ;
+: filter-exists ( seq -- seq' ) [ file-exists? ] filter ;
 
 ! These paths have syntax errors on purpose...
 : reject-some-paths ( seq -- seq' )
index 5bf7075208049a9f47ff3f41be24e8b1b80d673c..4074f75afbefae0df235e414118af0e3d6e30976 100644 (file)
@@ -12,7 +12,7 @@ IN: project-euler.041
 ! digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is
 ! also prime.
 
-! What is the largest n-digit pandigital prime that exists?
+! What is the largest n-digit pandigital prime that file-exists?
 
 
 ! SOLUTION
index 72a609389ca397955eccce37035987c301650218..cebd82aeb87e41c7c8c69ffb2873844e16af18fc 100644 (file)
@@ -74,7 +74,7 @@ TUPLE: read-file path encoding block ;
 
 : handle-send-file ( bytes -- )
     "\0" split harvest first2 [ utf8 decode ] bi@
-    over { [ exists? ] [ file-info directory? not ] } 1&& [
+    over { [ file-exists? ] [ file-info directory? not ] } 1&& [
         "netascii" sequence= utf8 binary ? 0 read-file boa
         tftp-client get clients get set-at
         0 handle-send-file-next
index 25a0d94f1edece4c39ae2359038a59d1f49183aa..1fdac5293fd674eb1aecbc7e5f1697554acae018 100644 (file)
@@ -62,7 +62,7 @@ TUPLE: maxlicense max-count current-count times ;
 : process ( max line -- max ) split-line inc-current-count update-time ;
 
 MEMO: mlijobs ( -- lines )
-    "mlijobs.txt" temp-file dup exists? [
+    "mlijobs.txt" temp-file dup file-exists? [
         URL" http://rosettacode.org/resources/mlijobs.txt"
         over download-to
     ] unless ascii file-lines ;
index 156ca33be1c7d5ef8b077c5985dd5c9720c99f80..f2c6ff57d1c7865d8e372c7f2181dc728e3af25b 100644 (file)
@@ -85,7 +85,7 @@ M: linux terminfo-relative-path ( name -- path )
 
 : terminfo-path ( name -- path )
     terminfo-relative-path TERMINFO-DIRS [ swap append-path ] with map
-    [ exists? ] find nip ;
+    [ file-exists? ] find nip ;
 
 : terminfo-names-for-path ( path -- names )
     [
@@ -94,7 +94,7 @@ M: linux terminfo-relative-path ( name -- path )
     ] with-directory-entries ;
 
 MEMO: terminfo-names ( -- names )
-    TERMINFO-DIRS [ exists? ] filter
+    TERMINFO-DIRS [ file-exists? ] filter
     [ terminfo-names-for-path ] map concat ;
 
 <PRIVATE
index 0aa9d897b387cd5de94f92e4d4d5b3612b184f9c..7294e9790730095bcd5eb846a07e12ff4e1edc38 100644 (file)
@@ -31,7 +31,7 @@ CONSTANT: tldr-zip URL" https://tldr-pages.github.io/assets/tldr.zip"
     ] with-directory ;
 
 : ?download-tldr ( -- )
-    "tldr/tldr.zip" cache-file exists? [ download-tldr ] unless ;
+    "tldr/tldr.zip" cache-file file-exists? [ download-tldr ] unless ;
 
 MEMO: tldr-index ( -- index )
     "tldr/index.json" cache-file path>json ;
index 45694598df4736bf1804412da84081e85196d85d..bd0ab867334031fdb8e7734183e1621b960cc131 100644 (file)
@@ -12,7 +12,7 @@ IN: tools.cat
     '[ _ stream-write ] each-stream-block ;
 
 : cat-file ( path -- )
-    dup exists? [
+    dup file-exists? [
         binary [ cat-stream ] with-file-reader
     ] [ "%s: not found\n" printf flush ] if ;
 
index cf2dbd853abf1a05404626ac0a47e24eca20ef7c..523e1212872c3c805b5bef84ac696ce81000947a 100644 (file)
@@ -15,7 +15,7 @@ IN: tools.copy
     [ unclip-last copy-files-into ] [ drop usage ] if ;
 
 : copy-to-file ( args -- )
-    dup last { [ exists? ] [ file-info directory? ] } 1&&
+    dup last { [ file-exists? ] [ file-info directory? ] } 1&&
     [ copy-to-dir ] [ first2 copy-file ] if ;
 
 : run-copy ( -- )
index f65125b41320da1a3dfba8e16bcb33f0cdb946d3..d941b36d9590989485f8d2ee8c7cf4be0ad9bf1a 100644 (file)
@@ -8,7 +8,7 @@ IN: tools.image-analyzer.graphviz.tests
     boot-image-name resource-path ;
 
 : ?make-image ( arch -- )
-    dup boot-image-path exists? [ drop ] [ make-image ] if ;
+    dup boot-image-path file-exists? [ drop ] [ make-image ] if ;
 
 : loadable-images ( -- images )
     image-names cpu name>> '[ _ tail? ] filter ;
index 0c1756362386f6a3b2affb184578da9ad7484301..882bf2ba5ef9be2c5e364caed6544fd7f3902296 100644 (file)
@@ -6,7 +6,7 @@ IN: tools.image-analyzer.tests
     boot-image-name resource-path ;
 
 : ?make-image ( arch -- )
-    dup boot-image-path exists? [ drop ] [ make-image ] if ;
+    dup boot-image-path file-exists? [ drop ] [ make-image ] if ;
 
 : loadable-images ( -- images )
     image-names cpu name>> '[ _ tail? ] filter ;
index e9fc2c742fc20c986e84dbc18d136d1076c234fa..44027b88ae028344f48ac5f2ef63a2efd9abc984 100644 (file)
@@ -20,7 +20,7 @@ M: imagebin call-responder*
     [ imagebin set ] [ call-next-method ] bi ;
 
 : move-image ( mime-file -- )
-    [ next-image-path dup exists? ] [ drop ] while
+    [ next-image-path dup file-exists? ] [ drop ] while
     [ [ temporary-path>> ] dip move-file ]
     [ [ filename>> ] dip ".txt" append utf8 set-file-contents ] 2bi ;
 
index 438e916d3e4bb9e3dcb7f8df82d123e028afc88c..d28ea88fa874e09250547bcefc34b235e212d124 100644 (file)
@@ -11,16 +11,16 @@ IN: webapps.mason.docs-update
 
 : update-docs ( -- )
     home [
-        "newdocs" exists? [ "newdocs" delete-tree ] when
+        "newdocs" file-exists? [ "newdocs" delete-tree ] when
 
         "newdocs" make-directory
         "newdocs" [ { "tar" "xfz" } docs-path suffix try-process ] with-directory
 
-        "docs" exists? [ "docs" "docs.old" move-file ] when
+        "docs" file-exists? [ "docs" "docs.old" move-file ] when
         "newdocs/docs" "docs" move-file
 
         "newdocs" delete-directory
-        "docs.old" exists? [ "docs.old" delete-tree ] when
+        "docs.old" file-exists? [ "docs.old" delete-tree ] when
 
         \ load-index reset-memoized
     ] with-directory ;
index cda2a58d2abeadcd584223ba29799608246cdf4c..2f4f42ec54c0663d93cb4903558c7e549f8a8c0e 100644 (file)
@@ -33,7 +33,7 @@ SynKeywordFactorWord factorWord_io | syn keyword factorWord_io contained (each-s
 SynKeywordFactorWord factorWord_io_encodings | syn keyword factorWord_io_encodings contained (decode-until) <decoder> <encoder> decode-char decode-error decode-error? decode-input decode-until decoder decoder? encode-char encode-error encode-error? encode-output encode-string encoder encoder? guess-decoded-length guess-encoded-length re-decode re-encode replacement-char with-decoded-input with-encoded-output
 SynKeywordFactorWord factorWord_io_encodings_binary | syn keyword factorWord_io_encodings_binary contained binary binary?
 SynKeywordFactorWord factorWord_io_encodings_utf8 | syn keyword factorWord_io_encodings_utf8 contained >utf8-index code-point-length code-point-offsets utf8 utf8-index> utf8?
-SynKeywordFactorWord factorWord_io_files | syn keyword factorWord_io_files contained (file-appender) (file-reader) (file-writer) +input+ +output+ +retry+ <file-appender> <file-reader> <file-writer> change-file-contents change-file-lines drain exists? file-contents file-lines file-reader file-reader? file-writer file-writer? init-resource-path refill set-file-contents set-file-lines wait-for-fd with-file-appender with-file-reader with-file-writer
+SynKeywordFactorWord factorWord_io_files | syn keyword factorWord_io_files contained (file-appender) (file-reader) (file-writer) +input+ +output+ +retry+ <file-appender> <file-reader> <file-writer> change-file-contents change-file-lines drain file-exists? file-contents file-lines file-reader file-reader? file-writer file-writer? init-resource-path refill set-file-contents set-file-lines wait-for-fd with-file-appender with-file-reader with-file-writer
 SynKeywordFactorWord factorWord_kernel | syn keyword factorWord_kernel contained (clone) -roll -rot -rotd 2bi 2bi* 2bi@ 2curry 2dip 2drop 2dup 2keep 2keepd 2nip 2nipd 2over 2tri 2tri* 2tri@ 2with 3bi 3curry 3dip 3drop 3dup 3keep 3nip 3nipd 3tri 4dip 4drop 4dup 4keep 4nip 5drop 5nip <wrapper> = >boolean ? ?if and assert assert= assert? bi bi* bi-curry bi-curry* bi-curry@ bi@ boa boolean boolean? both? build call callstack callstack>array callstack? clear clone compose composed composed? curried curried? curry die dip do drop dup dupd either? eq? equal? execute get-callstack get-datastack get-retainstack hashcode hashcode* identity-hashcode identity-tuple identity-tuple? if if* keep keepd keepdd loop most new nip nipd not null object or over overd pick pickd prepose reach recursive-hashcode roll rot rotd same? spin swap swapd throw tri tri* tri-curry tri-curry* tri-curry@ tri@ tuck tuple tuple? unless unless* until when when* while while* with wrapper wrapper? xor
 SynKeywordFactorWord factorWord_layouts | syn keyword factorWord_layouts contained (first-bignum) (fixnum-bits) (max-array-capacity) 32bit? 64bit? bootstrap-cell bootstrap-cell-bits bootstrap-cells bootstrap-first-bignum bootstrap-fixnum-bits bootstrap-max-array-capacity bootstrap-most-negative-fixnum bootstrap-most-positive-fixnum cell cell-bits cells data-alignment first-bignum fixnum-bits hashcode-shift header-bits immediate immediate? leaf-stack-frame-size max-array-capacity mega-cache-size most-negative-fixnum most-positive-fixnum num-types tag-bits tag-fixnum tag-header tag-mask type-number type-numbers untag-fixnum
 SynKeywordFactorWord factorWord_make | syn keyword factorWord_make contained % %% , ,+ ,, building make