From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 11-Jun-2009 18:06 UTC

XDCscript - Template-Object.genFile

Generate textual output file from a template

Contents

Synopsis

 
 
var tplt = xdc.loadTemplate(templateFile);
tplt.genFile(outputFile, thisObj, args, clobber);

Parameters

outputFile 
string name of the output file to be created
thisObj 
object that is referenced within the template via this
args 
array of arguments referenced within the template via $args
clobber 
boolean which, if true, causes genFile to overwrite outputFile even if the contents of an existing file are identical to the template output

Description

Generates output to a specified file, which is created if necessary. Unless clobber is true, an existing file is overwritten only when its content has truly changed. Internally calls genStream().

See also

XDCscript - Template-Body Contents of the template file
XDCscript - Template-Object.genStream Generate textual output stream from a template

[printable version]  [offline version]offline version generated on 11-Jun-2009 18:06 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved


Views
Personal tools
package reference