|
@@ -9,6 +9,7 @@ public interface ILuaFileSystem
|
|
|
public IStream? Open(string path, LuaFileOpenMode mode, bool throwError);
|
|
public IStream? Open(string path, LuaFileOpenMode mode, bool throwError);
|
|
|
public void Rename(string oldName, string newName);
|
|
public void Rename(string oldName, string newName);
|
|
|
public void Remove(string path);
|
|
public void Remove(string path);
|
|
|
|
|
+ public string GetTempFileName ();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public interface IStream : IDisposable
|
|
public interface IStream : IDisposable
|
|
@@ -111,6 +112,11 @@ public sealed class FileSystem : ILuaFileSystem
|
|
|
{
|
|
{
|
|
|
File.Delete(path);
|
|
File.Delete(path);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public string GetTempFileName ()
|
|
|
|
|
+ {
|
|
|
|
|
+ return Path.GetTempFileName();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public sealed class StreamWrapper(Stream innerStream) : IStream
|
|
public sealed class StreamWrapper(Stream innerStream) : IStream
|