GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Six — File Functions (continued)
QueryReadOnlyOverwrite Function
Overview
The QueryOverwrite function tests for the existence of the specified file with the read-only attribute set. If the file exists, the function queries the user as to whether it can be overwritten with a message box.
Syntax/Parameters
Syntax
int = QueryReadOnlyOverwrite ( string name );
Parameters
name
A string containing a fully qualified path and filename.
Return Value
Returns an int indicating the condition of the file and/or the user’s response. If an error occurs other than file not found or the file is found but without the read-only attribute set, a formatted error code will be returned and the GetLastError function can be used to retrieve error information. If the file does not exist but can be created, the function returns ERROR_NONE. If the file exists and the user indicates it is ok to overwrite, the function returns IDOK. If the file exists but the user indicates it should not be overwritten, the function returns IDCANCEL.
If a folder is selected as the name, ERROR_FUNCTION_NOT_SUPPORTED will be returned.
Remarks
The QueryReadOnlyOverwrite function first determines whether or not the specified file exists with the read-only attribute set before querying the user with a message box about overwriting the file. The format and management of the message box is handled by the script engine. The message box might appear as follows:
Do not rely on the IsError function to determine if the user canceled the operation since the cancel code returned by the QueryReadOnlyOverwrite function is IDCANCEL rather than ERROR_CANCEL.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.