/// <summary> /// Saves the <see cref="Beatmaps.Beatmap"/>. /// </summary> /// <returns>The absolute path of the output file.</returns> public string Save() { var path = FileSafety.GetTempPath(Guid.NewGuid().ToString().Replace("-", string.Empty) + ".json"); using (var sw = new StreamWriter(path)) sw.WriteLine(Beatmap.Serialize()); return(path); }
/// <summary> /// Saves the <see cref="Beatmaps.Beatmap"/>. /// </summary> /// <returns>The absolute path of the output file.</returns> public string Save() { string directory = Path.Combine(Path.GetTempPath(), @"osu!"); Directory.CreateDirectory(directory); var path = Path.Combine(directory, Guid.NewGuid().ToString().Replace("-", string.Empty) + ".json"); using (var sw = new StreamWriter(path)) sw.WriteLine(Beatmap.Serialize()); return(path); }