/// <summary>Deletes all of the active user's data.</summary> public virtual void ClearActiveUserData(ClearActiveUserDataCallback callback) { bool success = this.DeleteDirectory(this.userDir); if (callback != null) { callback.Invoke(success); } }
/// <summary>Clears all of the active user's data.</summary> public void ClearActiveUserData(ClearActiveUserDataCallback callback) { var steamFiles = Steamworks.SteamRemoteStorage.Files; bool success = true; foreach (string path in steamFiles) { if (path.StartsWith(FacepunchUserDataIO.USER_DIR_ROOT)) { success = Steamworks.SteamRemoteStorage.FileDelete(path) && success; } } if (callback != null) { callback.Invoke(success); } }
/// <summary>Clears all of the active user's data.</summary> public void ClearActiveUserData(ClearActiveUserDataCallback callback) { int fileCount = Steamworks.SteamRemoteStorage.GetFileCount(); bool success = true; for (int i = 0; i < fileCount; ++i) { string path; int fileSize; path = Steamworks.SteamRemoteStorage.GetFileNameAndSize(i, out fileSize); if (path.StartsWith(SteamworksNETUserDataIO.USER_DIR_ROOT)) { success = Steamworks.SteamRemoteStorage.FileDelete(path) && success; } } if (callback != null) { callback.Invoke(success); } }