コード例 #1
0
        /// <summary>
        /// Saves the data into desired folder.
        /// </summary>
        /// <param name="basePath">Base path to the folder.</param>
        /// <param name="folder">Desired folder.</param>
        public void Save(string basePath = "./")
        {
            if (Directory.Exists(basePath + "basic"))
            {
                Directory.Delete(basePath + "basic", true);
            }
            Directory.CreateDirectory(basePath + "basic");

            RoutesInfo.WriteBasic(new StreamWriter(basePath + "basic/routes_info.tfb"));
            Stops.WriteBasic(new StreamWriter(basePath + "basic/stops.tfb"));
            Stations.WriteBasic(new StreamWriter(basePath + "basic/stations.tfb"));
            using (var sw = new StreamWriter(basePath + "basic/.version"))
                sw.WriteLine(Version);
        }