Created
April 26, 2020 22:49
-
-
Save TheFo2sh/caf664c53400265c051967c75f4c5b69 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IFileSystem | |
{ | |
File CreateFile(string filename); | |
void DeleteFile(string filename); | |
File GetFile(string filename); | |
public File GetOrCreateFile(string filename) | |
{ | |
var file = GetFile(filename); | |
if (file == null) | |
file = CreateFile(filename); | |
return file; | |
} | |
} | |
public class WindowsFileSystem : IFileSystem | |
{ | |
public File CreateFile(string filename) | |
{ | |
throw new System.NotImplementedException(); | |
} | |
public void DeleteFile(string filename) | |
{ | |
throw new System.NotImplementedException(); | |
} | |
public File GetFile(string filename) | |
{ | |
throw new System.NotImplementedException(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment