-
public abstract class FileConflictCallback<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description private CoroutineScopeuiScope
-
Constructor Summary
Constructors Constructor Description FileConflictCallback(CoroutineScope uiScope)FileConflictCallback()
-
Method Summary
Modifier and Type Method Description final CoroutineScopegetUiScope()final UnitsetUiScope(CoroutineScope uiScope)UnitonFileConflict(T destinationFile, FileCallback.FileConflictAction action)Do not call superwhen you override this function.-
-
Method Detail
-
getUiScope
final CoroutineScope getUiScope()
-
setUiScope
final Unit setUiScope(CoroutineScope uiScope)
-
onFileConflict
@UiThread() Unit onFileConflict(T destinationFile, FileCallback.FileConflictAction action)
Do not call
superwhen you override this function.The thread that does copy/move/decompress will be suspended until the user gives an answer via FileConflictAction.confirmResolution. You have to give an answer, or the thread will be alive until the app is killed and end up as a zombie thread. If you want to cancel, just pass ConflictResolution.SKIP into FileConflictAction.confirmResolution. If the worker thread is suspended for too long, it may be interrupted by the system.
-
-
-
-