Skip to content

Recursive creation of directories when writing files #7

@rgerkin

Description

@rgerkin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions