External File(s)

The External File(s) node type allows a node to copy file(s) from one folder to another at code generation time.

Assuming we want our stencil/project to:

1) Copy Model Classes from the folder Entity Framework scaffolded the files. This folder name is not hard-coded but can be expanded from this Expander - [%EF_SCAFFOLD_FOLDER%]. These will be all files with the extension (*.cs).

2) Exclude the DbContext Class because it is used in a seperate folder.

This is what the setup in the node will look like:

  1. This sectional indicator - "[Files]," specifies the preceding lines contains filenames or wildcards
  2. This string identifies the file that is being copied. It can be a hard-coded filename (although not advised), or a string containing an expander. It can also include a wildcard especially in the case when you don't which files you are copying.
  3. This string is the filename or wildcard to exclude. This is specified by preceding the filename with a -ve ( or minus) sign

 

 


Was this article helpful?