SaveFileIfModified Method

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Syntax

PropertyObjectFile.SaveFileIfModified ( prompt = True)

Return Value

Boolean

Returns False only if the user clicked Cancel in the Prompt dialog box.

Purpose

Writes the contents of the file to disk if the file has been modified.

Remarks

This method does nothing if the file has not been modified. If the file has been modified, it prompts the user with an option to save, then writes the file. The PropertyObjectFile.Path property determines the pathname of the file to write.

Note  If you call this method multiple times and do not save the file or further modify it, the method prompts only once. Unlike the PropertyObjectFile.WriteFile method, if an error occurs while saving the file, the method displays the error and does not throw an exception.

Parameters

prompt As Boolean

[In] If this parameter is True and if the file has been modified, a dialog box opens and asks the user whether to save the file.

This parameter has a default value of True.


See Also

PropertyObjectFile.IsModified

PropertyObjectFile.Path

PropertyObjectFile.WriteFile

WAS THIS ARTICLE HELPFUL?

Not Helpful