1

I am using freemarker templates to automatically generate files. While this works fine so far - including changing the names of files - I have one additional feature I need. The name of some directories within the virtual file path have to be changed according to a template, for example:

  • /${flow.name}_design/...
  • /${flow.name}_implementation/...

Is there a way to achieve this with the template engine? Thanks for your help and best regards.

Yanick Salzmann
  • 1,456
  • 1
  • 15
  • 27

1 Answers1

2

FMPP only creates output directories as needed. Since you can rename output files, and the directory can be part of the new name, you can influence if in what directory the output file will be created.

ddekany
  • 29,656
  • 4
  • 57
  • 64
  • could you please elaborate more about this? So the FMPP currently doesn't possible to create new directory / package? – mochadwi Jun 26 '19 at 02:53
  • 1
    @mochadwi It is possible. It's just that by default, output directories are created when an output file is created inside them. But if you need to create an empty output directory for an empty source directory, then create a file called `createdir.fmpp` in the source directory. That will force the creation of the corresponding output directory, while the `createdir.fmpp` itself won't be copied. – ddekany Jun 27 '19 at 19:47
  • Okay, that explained everything. Thank you very much @ddekany – mochadwi Jul 01 '19 at 04:12