Handbook
Glossary
check-file-exists ( path -- path )
Vocabulary
io
.
files
Inputs
path
a pathname string
Outputs
path
a pathname string
Word description
Check if a file exists, otherwise throw a
no-such-file
error.
Errors
Throws an error if the file does not exist.
Definition
USING:
kernel
;
IN:
io.files
:
check-file-exists
( path -- path )
dup
file-exists?
[
no-such-file
]
unless
;