-
public abstract class BaseFileCallback<ErrorCode extends Object, Report extends Object, Result extends Object>Created on 02/06/21
-
-
Field Summary
Fields Modifier and Type Field Description private CoroutineScopeuiScope
-
Constructor Summary
Constructors Constructor Description BaseFileCallback(CoroutineScope uiScope)
-
Method Summary
Modifier and Type Method Description final CoroutineScopegetUiScope()final UnitsetUiScope(CoroutineScope uiScope)UnitonValidate()UnitonPrepare()UnitonDeleteConflictedFiles()Called after the user chooses FolderCallback.ConflictResolution.REPLACE or FileCallback.ConflictResolution.REPLACE BooleanonCheckFreeSpace(Long freeSpace, Long fileSize)Given freeSpaceandfileSize, then you decide whether the process will be continued or not.UnitonReport(Report report)UnitonCompleted(Result result)UnitonFailed(ErrorCode errorCode)-
-
Method Detail
-
getUiScope
final CoroutineScope getUiScope()
-
setUiScope
final Unit setUiScope(CoroutineScope uiScope)
-
onValidate
@UiThread() Unit onValidate()
-
onDeleteConflictedFiles
@UiThread() Unit onDeleteConflictedFiles()
Called after the user chooses FolderCallback.ConflictResolution.REPLACE or FileCallback.ConflictResolution.REPLACE
-
onCheckFreeSpace
@WorkerThread() Boolean onCheckFreeSpace(Long freeSpace, Long fileSize)
Given
freeSpaceandfileSize, then you decide whether the process will be continued or not. You can give space tolerant here, e.g. 100MB- Parameters:
freeSpace- of target path
-
onCompleted
@UiThread() Unit onCompleted(Result result)
-
-
-
-