Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using Yaml;
- using System.IO;
- using System.Text;
- using System;
- public class SaverClass {
- public static void SaveString(string fileName, string name, string value)
- {
- {
- string path = @"c:\tmp\"+fileName+".yml";
- {
- // Delete the file if it exists.
- if (!File.Exists(path))
- {
- // Create the file.
- using (FileStream fs = File.Create(path)) { }
- }
- Sequence sequence = new Sequence(
- new Node[]
- {
- new Yaml.String (name
- ),
- new Mapping (
- new MappingNode []
- {
- new MappingNode (new Yaml.String (name), new Yaml.String (value))
- ,
- } ),
- });
- sequence.ToFile(path);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment