How to create/remove a directory

I’m a first-time Travis CI user and I’m running into an issue. My code (written in Julia) has a function whose job is to download some data from a server and stick it in a directory specified by the user. I have tests that check whether or not the directory was created and whether or not the files are in it. Once the tests have run, I delete the directories.

All this works fine on my local machine but it seems that the code that creates the directory throws an error on Travis. I get:

ERROR: LoadError: SystemError (with /home/travis/.julia/datadeps/CPS 2019/test/data): mkdir: No such file or directory

Can someone tell me if this kind of testing is possible and what the best way of doing it is?

Perhaps, a parent directory exists on your machine but not on Travis?

https://docs.julialang.org/en/v1/base/file/#Base.Filesystem.mkpath