Check for file existence in Julia

Is there an easy way in Julia to check if a file exists in the current working directory (something like test = os.path.isfile("foo.txt") in Python or inquire(file = "foo.txt", exist = test) in Fortran)?

+8
source share
1 answer

Julia has isfile() for checking a regular file:

 julia> isfile("foo.txt") false shell> touch foo.txt julia> isfile("foo.txt") true 

As the documentation :

Returns true if the path (parameter) is a regular file, otherwise false.

+15
source

Source: https://habr.com/ru/post/1244973/


All Articles