saveIfModifiedAsync

abstract fun saveIfModifiedAsync(): Single<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

Single observable returning true if file was saved or false if there was no changes to be saved.


abstract fun saveIfModifiedAsync(@NonNull saveOptions: DocumentSaveOptions): Single<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

Single observable returning true if file was saved or false if there was no changes to be saved.

Parameters

saveOptions

Save options for the document.


abstract fun saveIfModifiedAsync(@NonNull path: String): Single<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

Single observable returning true if file was saved or false if there was no changes to be saved.

Parameters

path

Absolute filepath to which to save the document.


abstract fun saveIfModifiedAsync(@NonNull path: String, @NonNull saveOptions: DocumentSaveOptions): Single<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

Single observable returning true if file was saved or false if there was no changes to be saved.

Parameters

path

Absolute filepath to which to save the document.

saveOptions

Save options for the document, may be null to use default set.