User manual - Scripting_Guide

NAURTECH SMART CLIENTS FOR WINDOWS CE AND POCKET PC
CETerm Scripting Guide Page 36
status = Move( existingFilename, newFileName )
Move or rename an existing file. Returns true for success, false for failure.
Use the File properties LastError or LastErrorMessge to get additional error
information.
contents = Read( filename )
Read entire file and return as contents. The read is an atomic operation which
opens the file, reads all contents and closes the file. The File object does not
support the concept of an “open” file or reading parts of a file. There must be
sufficient memory to hold the entire file contents. There is no error information
returned. Use GetAttributes to validate a filename and ensure read access.
status = RemoveDirectory( directoryname )
Delete an existing directory. Returns true for success, false for failure.
Use the File properties LastError or LastErrorMessge to get additional error
information.
status = SetAttributes( filename, attributes )
Sets the attributes of the file. Returns true for success, false for failure. Use the
File properties LastError or LastErrorMessge to get additional error information.
See Appendix 4 for attribute definitions.
status = Write( filename, contents )
Writes contents to the file. Returns true for success, false for failure. Any current
contents are first deleted. The write is an atomic operation which opens the file,
writes all contents and closes the file. The File object does not support the
concept of an “open” file or writing parts of a file. To append to a file, use Read
to get the current contents and Write the combined current and additional
contents. Use the File properties LastError or LastErrorMessge to get
additional error information.
Properties
The File object has the following properties.