How can I generate multiple files from a single source file?
Asked by Guido Wachsmuth on 19 March 2013 at 04:47
1 Answer
You can write directly to a file as follows:
handle := <fopen> ("somefilename.ext", "w"); <fputs> ("file contents string", handle); fclose
If you use this API from a
builder
oron save
rule, you can change it to the following form to ensure it only writes files statements like the above:Answered by Guido Wachsmuth on 19 March 2013 at 04:47generate-java: (selected, position, ast, path, project-path) -> None()