コード例 #1
0
ファイル: WorkingBeatmap.cs プロジェクト: clydejallorina/osu
        /// <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);
        }
コード例 #2
0
        /// <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);
        }