unless-file-exists ( ... path quot: ( ... path -- ... ) -- ... )


Vocabulary
io.files

Inputs
patha pathname string
quota quotation with stack effect ( ... path -- ... )


Outputs
None

Word description
If path is a file that does not exist, calls the quot quotation.

Notes
It is possible for the file to be created or deleted after the call to file-exists? but before running quot. If that is a concern, you might want to open the file for reading or writing, as needed.

See also
if-file-exists, when-file-exists

Definition


: unless-file-exists
( ... path quot: ( ... path -- ... ) -- ... )
[ drop ] swap if-file-exists ; inline