A game about forced loneliness, made by TACStudios
1/*---------------------------------------------------------------------------------------------
2 * Copyright (c) Unity Technologies.
3 * Copyright (c) Microsoft Corporation. All rights reserved.
4 * Licensed under the MIT License. See License.txt in the project root for license information.
5 *--------------------------------------------------------------------------------------------*/
6using System.IO;
7using System.Text;
8
9namespace Microsoft.Unity.VisualStudio.Editor
10{
11 public interface IFileIO
12 {
13 bool Exists(string fileName);
14
15 string ReadAllText(string fileName);
16 void WriteAllText(string fileName, string content);
17 }
18
19 class FileIOProvider : IFileIO
20 {
21 public bool Exists(string fileName)
22 {
23 return File.Exists(fileName);
24 }
25
26 public string ReadAllText(string fileName)
27 {
28 return File.ReadAllText(fileName);
29 }
30
31 public void WriteAllText(string fileName, string content)
32 {
33 File.WriteAllText(fileName, content, Encoding.UTF8);
34 }
35 }
36}