InputFolderNode
The standard "inputFolderNode" that is passed to all generators is an InputFolderNode object with the following properties and methods. Use this object to access the files in the generator's source folder.
Read-only Properties
- type: returns a NodeType constant
- path: returns the path to this resource (relative to the root folder the generator is working with)
- childNodes: returns an array of InputFolderNodes and InputFileNodes that comprise this node's children
Methods
fileForPath(path)
Returns the InputFileNode for the file at path relative to this InputFolderNode.
folderForPath(path)
Returns the InputFolderNode for the file at path relative to this InputFolderNode.
inputNodesOfType(type, maxDepth)
Returns an array of InputFileNodes that match the given NodeType type.
maxDepth is optional and should be an integer representing the maximum number of directories you wish to recurse down.