From 47f153ffa67e37eb0b9a35eb583d5dc6f61f354e Mon Sep 17 00:00:00 2001 From: James King Date: Thu, 9 Nov 2017 11:00:10 +0000 Subject: [PATCH] Added RemoteFile.Forget() --- Facepunch.Steamworks/Client/RemoteStorage.File.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Facepunch.Steamworks/Client/RemoteStorage.File.cs b/Facepunch.Steamworks/Client/RemoteStorage.File.cs index 3cac8c8..58b93ae 100644 --- a/Facepunch.Steamworks/Client/RemoteStorage.File.cs +++ b/Facepunch.Steamworks/Client/RemoteStorage.File.cs @@ -278,6 +278,19 @@ public bool Delete() return true; } + /// + /// Remove this file from remote storage, while keeping a local copy. + /// Writing to this file again will re-add it to the cloud. + /// + /// True if the file was forgotten + public bool Forget() + { + if ( !Exists ) return false; + if ( _isUgc ) return false; + + return remoteStorage.native.FileForget( FileName ); + } + private void GetUGCDetails() { if ( !_isUgc ) throw new InvalidOperationException();