I was trying to call createDirectory
and catching isAlreadyExistError
in order to do nothing in this case. I realized then that there is createDirectoryIfMissing
and use it. But still I’m puzzled by the documentation for createDirectory
, which says that:
`isAlreadyExistsError` The operand refers to a directory that already exists. [EEXIST]
Which leads me to believe that I can catch an IOException
and do an if isAlreadyExistsError e ...
. But that doesn’t seem possible, because the predicate is in a private module.
How is this supposed to be used?