AnnulusGames 1 year ago
parent
commit
6950bda023

+ 2 - 2
src/Lua/Standard/IO/FileCloseFunction.cs → src/Lua/Standard/IO/CloseFunction.cs

@@ -1,9 +1,9 @@
 namespace Lua.Standard.IO;
 
-public sealed class FileCloseFunction : LuaFunction
+public sealed class CloseFunction : LuaFunction
 {
     public override string Name => "close";
-    public static readonly FileCloseFunction Instance = new();
+    public static readonly CloseFunction Instance = new();
 
     protected override ValueTask<int> InvokeAsyncCore(LuaFunctionExecutionContext context, Memory<LuaValue> buffer, CancellationToken cancellationToken)
     {

+ 1 - 1
src/Lua/Standard/IO/FileHandle.cs

@@ -17,7 +17,7 @@ public class FileHandle : LuaUserData
                 {
                     "write" => FileWriteFunction.Instance,
                     "flush" => FileFlushFunction.Instance,
-                    "close" => FileCloseFunction.Instance,
+                    "close" => CloseFunction.Instance,
                     _ => LuaValue.Nil,
                 };
             }

+ 2 - 2
src/Lua/Standard/IO/FileOpenFunction.cs → src/Lua/Standard/IO/OpenFunction.cs

@@ -1,9 +1,9 @@
 namespace Lua.Standard.IO;
 
-public sealed class FileOpenFunction : LuaFunction
+public sealed class OpenFunction : LuaFunction
 {
     public override string Name => "open";
-    public static readonly FileOpenFunction Instance = new();
+    public static readonly OpenFunction Instance = new();
 
     protected override ValueTask<int> InvokeAsyncCore(LuaFunctionExecutionContext context, Memory<LuaValue> buffer, CancellationToken cancellationToken)
     {

+ 2 - 2
src/Lua/Standard/OpenLibExtensions.cs

@@ -74,8 +74,8 @@ public static class OpenLibExtensions
     ];
 
     static readonly LuaFunction[] ioFunctions = [
-        FileOpenFunction.Instance,
-        FileCloseFunction.Instance,
+        OpenFunction.Instance,
+        CloseFunction.Instance,
         InputFunction.Instance,
         OutputFunction.Instance,
     ];