Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check & create parent directory before calling FileOutputStream #379

Open
deusaquilus opened this issue Dec 5, 2021 · 1 comment
Open

Comments

@deusaquilus
Copy link

deusaquilus commented Dec 5, 2021

In addition to #372 please check that when opening the FileOutputStream the parent directory of the file exists (and create it if it doesn't). Have a look in commons-io at FileUtils.openOutputStream (here) or PathUtils.newOutputStream (here).

Both of those functions:

  1. Check that the parent directory of the file exists, if it does not then create it.
  2. Check that the file exists
  3. Check that the file is writable (not possible with 'path' API)
@jdegoes
Copy link
Member

jdegoes commented Jan 17, 2022

This is still relevant to zio.logging.internal.FileWriter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants