ProperSave.SaveFileMetadata.UpdateSaveMetadata C# (CSharp) Method

UpdateSaveMetadata() private static method

private static UpdateSaveMetadata ( ) : void
return void
        private static void UpdateSaveMetadata()
        {
            var path = $"{ProperSavePlugin.SavesDirectory}\\SavesMetadata.json";
            if (!Directory.Exists(ProperSavePlugin.SavesDirectory))
            {
                Directory.CreateDirectory(ProperSavePlugin.SavesDirectory);
            }

            try
            {
                File.WriteAllText(path, JSONWriter.ToJson(SavesMetadata));
            }
            catch (Exception e)
            {
                ProperSavePlugin.InstanceLogger.LogWarning("Can't update SavesMetadata file");
                ProperSavePlugin.InstanceLogger.LogError(e);
            }
        }
    }