Skip to main content
Archived

DirectoryChecker/Creator transformer

Related products:Transformers

jdh
Contributor
  • Contributor

It would be nice if there were a built-in transformer that would check if the supplied directory exists and is writeable and optionally create it if it doesn't exist.

There are a few transformers that can write to files directly, and they will fail if the directory doesn't already exist. For example the HTTPCaller with Save Response Body to File.

I do have a python script that does it, but wrapping it in a custom transformer get tricky with parameters [see python-caller-user-parametersl]

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • June 10, 2016

Ideally we'd adopt a policy of "create directory if necessary" across all these areas -- our writer framework already does this for example. Thanks for pointing this out.


jdh
Contributor
Forum|alt.badge.img+36
  • Author
  • Contributor
  • June 13, 2016

That also works. :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings