Creates a vertical pipe separated datafile from the supplied
list-of-lists list. The datafile contents are written into
the file according to the current output character encoding, see setCharSet for more details.
You can supply any MillScript object as the fname, but
there are three points to consider:
e will be rendered to the file it specifies.
fname. If the fname
contains a period, anything up to the last one will be considered the
filename and anything after will be considered the extension. If the
fname doesn't contain a period, the extension "html" will
be appended automatically. e.g.
:-) dataFile( "sample", { { "a value" } } );
There are 0 results
:-) dataFile( "sample.wml", { { "another value" } } );
There are 0 results
fname has already been created in the
current MillScript instance, the filename will have an integer
appended to it to make it unique. Please see the notes for the newURL function for more details.
:-) folder.addLast( "parent" );
There are 0 results
:-) dataFile(
:-) "sample",
:-) { { "value" } }
:-) );
There are 0 results
list must be a list of lists. The outer list
generates one line in the datafile per item in the list. Each line in
the datafile is made of the items in the inner lists separated by a
vertical pipe |. e.g.
:-) dataFile(
:-) "datafile.db",
:-) {
:-) { "item 1", "item 2", "item 3" },
:-) { "this", "is", "another", "list" }
:-) }
:-) );
There are 0 results
item 1|item 2|item 3
this|is|another|list
URL object multiple times, each
successive use will replace the previously written file. See newURL for details.