PreviousUpNext

5.5.51  Check File Existence

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:

-Disdirposix::stat::is_directory
-Pispipeposix::stat::is_pipe
-Lissymlinkposix::stat::is_symlink
-Sissocketposix::stat::is_socket
-Cischardevposix::stat::is_char_dev
-Bisblockdevposix::stat::is_block_dev

Comments and suggestions to: bugs@mythryl.org

PreviousUpNext