flush
Complete a file management transaction for the specified open zip archive or XML file, then close the file.
flush "
ZipArchive:"
|
"
XmlFile"
Example:
flush "myexport.xml"
Parameters
Parameter | Data Type | Description |
---|---|---|
ZipArchive | String | Zip file name, optionally preceded by the path to the file |
XmlFile | String | XML file accessed by $ude
("export") or $ude ("copy") with the keepopen option.
|
For more information, see Syntax of File and Directory Names.
Use
Allowed in all component types.
Description
When accessing files and directories located in
zip archives, Uniface keeps file open to avoid the performance problems entailed by repeatedly
opening and closing files. For the same reason, you can specify the keepopen
option when repeatedly using $ude ("export") or $ude ("copy")
to export or copy files.
The flush ProcScript statement explicitly completes an open transaction for a specified zip archive or XML file and closes the file, taking any assignment file redirections into account. If no absolute path is specified, the location of the zip archive is determined by the assignment file. If it is not defined there, it defaults to the Uniface project directory.
Flushing Zip Files
The following example writes data to the def.txt file located in the dir1 directory within the b5.zip archive, then saves and close the file using flush. Unless the location of the zip archive is specified in the assignment file, the zip file is written to the Uniface project directory.
filedump "abc", "C:\Uniface\Uniface96_Data\project\b5.zip:dir1\def.txt" flush "C:\Uniface\Uniface96_Data\project\b5.zip:"
Flushing Export Files
In the following example, all models and components are exported, and flush is used to close complete the transaction:
vOut = $ude("export", "model", "*", "myexport.xml", "keepopen=true") vOut = $ude("export", "component", "*", "myexport.xml", "keepopen=true;append=true") flush "myexport.xml"
Version | Change |
---|---|
9.1.01 | Introduced |