Added RemoteFile.Forget()

This commit is contained in:
James King 2017-11-09 11:00:10 +00:00
parent 1d0fe2b814
commit 47f153ffa6

View File

@ -278,6 +278,19 @@ public bool Delete()
return true; return true;
} }
/// <summary>
/// Remove this file from remote storage, while keeping a local copy.
/// Writing to this file again will re-add it to the cloud.
/// </summary>
/// <returns>True if the file was forgotten</returns>
public bool Forget()
{
if ( !Exists ) return false;
if ( _isUgc ) return false;
return remoteStorage.native.FileForget( FileName );
}
private void GetUGCDetails() private void GetUGCDetails()
{ {
if ( !_isUgc ) throw new InvalidOperationException(); if ( !_isUgc ) throw new InvalidOperationException();