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

Recursive creation of directories when writing files #7

Open
rgerkin opened this issue Nov 10, 2017 · 0 comments
Open

Recursive creation of directories when writing files #7

rgerkin opened this issue Nov 10, 2017 · 0 comments

Comments

@rgerkin
Copy link
Member

rgerkin commented Nov 10, 2017

When the results path is like this, jNeuroML (or NEURON, or whatever is handling the writing of the data) will try to write results to that path (e.g. results/RS_One.dat, but then fail if the directory results doesn't already exist.

We don't want to have to rely on the directory results existing wherever we happen to be running the simulation from, or in any particular exec_dir we specify. We also don't want to rely on the simulator (which could be anything) creating the directory for us. I propose that jNeuroML check paths that may be written to, and recursively create subdirectories to prepare for eventualy file writes by itself or a simulator it may be calling, to avoid this kind of error.

In the meantime, I have to either make all paths absolute or remove subdirectories from relative paths to ensure that the files can always be safely written under all circumstances.

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

1 participant