saveIfModifiedAsync

abstract suspend fun saveIfModifiedAsync(): Boolean

Saves the document back to original location if it has been changed. If there were no changes to the document, the document file will not be modified.

Return

true if file was saved or false if there were no changes to be saved.


abstract suspend fun saveIfModifiedAsync(saveOptions: DocumentSaveOptions): Boolean

Saves the document back to original location if it has been changed. If there were no changes to the document, the document file will not be modified.

Return

true if file was saved or false if there were no changes to be saved.

Parameters

saveOptions

Save options for the document.


abstract suspend fun saveIfModifiedAsync(path: String): Boolean

Saves the document to an external file if it has been changed. This will not clear the wasModified flag on this document instance, and will not replace the source of this document either (i.e. subsequent calls to saveIfModified will still save the document back to the original file).

Return

true if file was saved or false if there were no changes to be saved.

Parameters

path

Absolute filepath to which to save the document.


abstract suspend fun saveIfModifiedAsync(path: String, saveOptions: DocumentSaveOptions): Boolean

Saves the document to an external file if it has been changed. This will not clear the wasModified flag on this document instance, and will not replace the source of this document either (i.e. subsequent calls to saveIfModified will still save the document back to the original file).

Return

true if file was saved or false if there were no changes to be saved.

Parameters

path

Absolute filepath to which to save the document.

saveOptions

Save options for the document.