Skip to content

File writer create directory feature#49

Merged
MarkRivers merged 6 commits intomasterfrom
CreateDir
Jan 8, 2015
Merged

File writer create directory feature#49
MarkRivers merged 6 commits intomasterfrom
CreateDir

Conversation

@ulrikpedersen
Copy link
Copy Markdown
Member

This is a feature which was implemented April 2014 at DLS by @NicholasRees.

The NDFileCreateDir parameter is used to automatically create directories if they don't exist. It works in 3 modes:

  • If it is zero (default), no directories are created.
  • If it is negative, then the absolute value is the maximum of directories that will be created
    • a value of -1 will create a maximum of one directory to complete the path, -2 will create a maximum of 2 directories.
  • If it is positive, then at least that many directories in the path must exist
    • a value of 1 will create all directories below the root directory and 2 will not create a directory in the root directory.

This feature is independent of the TempSuffix feature in pull request #48 . However, the source code of these two pull requests live in the same functions (neighbouring lines) so care should be taken when merging to ensure they do not overwrite each other...

Nick Rees and others added 5 commits January 6, 2015 11:03
A CREATE_DIR parameter can be set to 1 to enable this feature. The default
is 0 (i.e. no directory creation).
Now with both TempSuffix and CreateDir PVs
Was originally longout/in and are now bo/bi as per convention.
EDM screen modified to reflect this.
Reverted the change of NDFile.template to use longin/out again as the
Create Directory feature actually uses the value of the parameter rather
than just enable/disable.

Modified the EDM screen to match.
To include the File writer create directory feature.
@ulrikpedersen
Copy link
Copy Markdown
Member Author

I have just had a go at merging this and #48 together into master on my local clone. There are a few (benign) conflicts with #48 as these both add new parameters in the same location in the source files. Although we want to keep both additions, git thinks it is a conflict and so it has to be resolved manually.

It is not a big deal, but to avoid confusion and make life bearable; I propose to first merge #48 and then merge master into this CreateDir branch, resolving the conflicts here. Afterwards, this Pull Request can be automatically merged into master.

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

Successfully merging this pull request may close these issues.

2 participants