Check that a file exists:
eval: isfile "foo.txt"; TRUE
A shorter synonym for Perl afficionados:
eval: -F "foo.txt"; TRUE
The full form, for programs (vs scripts):
eval: posix::stat::is_file (posix::stat "foo.txt") except _ = FALSE; TRUE
Related tests:
-D | isdir | posix::stat::is_directory |
-P | ispipe | posix::stat::is_pipe |
-L | issymlink | posix::stat::is_symlink |
-S | issocket | posix::stat::is_socket |
-C | ischardev | posix::stat::is_char_dev |
-B | isblockdev | posix::stat::is_block_dev |