Anonymous user
Check that file exists: Difference between revisions
+ Forth
(Perl - Without a perl module) |
(+ Forth) |
||
Line 10:
if exist docs echo The following directory called docs exists.
if exist \docs\ echo The following directory called \docs\ exists.
==[[Forth]]==
[[Category:Forth]]
: .exists ( str len -- ) 2dup file-status nip 0= if type ." exists" else type ." does not exist" then ;
s" input.txt" .exists
s" /input.txt" .exists
s" docs" .exists
s" /docs" .exists
==[[Java]]==
|