Check that file exists: Difference between revisions
Content added Content deleted
(Add Seed7 example) |
(added factor example) |
||
Line 288: | Line 288: | ||
require(file.isDirectory(), fn { `$file is not a directory!` }) |
require(file.isDirectory(), fn { `$file is not a directory!` }) |
||
}</lang> |
}</lang> |
||
=={{header|Factor}}== |
|||
<lang factor>: print-exists? ( path -- ) |
|||
[ write ": " write ] [ exists? "exists." "doesn't exist." ? print ] bi ; |
|||
{ "input.txt" "/input.txt" "docs" "/docs" } [ print-exists? ] each</lang> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |
||