mirror of
https://github.com/Ratstail91/Mementos.git
synced 2025-11-29 02:24:28 +11:00
25 lines
652 B
C#
25 lines
652 B
C#
using System.IO;
|
|
|
|
namespace Ink
|
|
{
|
|
public interface IFileHandler
|
|
{
|
|
string ResolveInkFilename (string includeName);
|
|
string LoadInkFileContents (string fullFilename);
|
|
}
|
|
|
|
public class DefaultFileHandler : Ink.IFileHandler {
|
|
public string ResolveInkFilename (string includeName)
|
|
{
|
|
var workingDir = Directory.GetCurrentDirectory ();
|
|
var fullRootInkPath = Path.Combine (workingDir, includeName);
|
|
return fullRootInkPath;
|
|
}
|
|
|
|
public string LoadInkFileContents (string fullFilename)
|
|
{
|
|
return File.ReadAllText (fullFilename);
|
|
}
|
|
}
|
|
}
|