void BackupInstant() | Blocking backup of the local file to remote. Errors are logged, not thrown. |
Task BackupToRemote() | Starts an async backup unless one is already running for this file. |
void Delete(bool isDeletingBackup = false) | Deletes the remote file, then the local one. |
async Task DeleteAsync(bool isDeletingBackup = false) | Async version of Delete. |
async Task EnsureCopied() | Pulls the file from remote the first time it is called and waits for any copy still running. |
void FinishReading() | Passes through to the local file. |
void FinishWriting() | Passes through to the local file. |
void MoveTo(IAltaFolder folder) | Moves the local file only; the remote copy stays where it is. |
void QueueUnload() | Passes through to the local file. |
async Task QueueUnloadAsync() | Passes through to the local file. |
Task<T> ReadAsync<T>() | Pulls the file from remote if not done yet, then reads it from the local copy. |
async Task<T> ReadAsync<T>(Func<T> create) | Pulls the file from remote if not done yet, then reads it from the local copy. |
void Refresh() | Refreshes both the remote and local file info. |
void ResetHasChanged() | Clears the local file's changed flag. |
async void WriteAsync() | Waits for any running backup, then writes the local file. |
protected virtual void BackupInstantInternal() | Blocking upload. Default waits on BackupToRemoteInternal. |
protected abstract Task BackupToRemoteInternal() | Implemented by subclasses to upload the local file. |
protected abstract Task CopyFromRemoteInternal() | Implemented by subclasses to download the remote file. |
protected override void Finalize() | Removes the file from allRemoteFiles. In practice that list keeps it alive, so this does not run. |