Skip to content

Commit

Permalink
Merge pull request #21 from jmj0502/feature/readme
Browse files Browse the repository at this point in the history
Feature/readme
  • Loading branch information
jmj0502 authored Sep 22, 2022
2 parents 4e0e9dd + df3a69b commit aae0123
Show file tree
Hide file tree
Showing 4 changed files with 819 additions and 5 deletions.
11 changes: 8 additions & 3 deletions GlobalModules/IO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public class CreateFile : ICallable
{
public int Arity()
{
return 1;
return 2;
}

public object Call(Interpreter.Interpreter interpreter, List<object> arguments)
Expand Down Expand Up @@ -184,7 +184,7 @@ public class WriteFile : ICallable
{
public int Arity()
{
return 1;
return 2;
}

public object Call(Interpreter.Interpreter interpreter, List<object> arguments)
Expand Down Expand Up @@ -370,7 +370,12 @@ public object Call(Interpreter.Interpreter interpreter, List<object> arguments)
try
{
var dirFiles = System.IO.Directory.GetFiles(path);
return new ResultOK().Call(interpreter, new List<object> { dirFiles });
var filePaths = new List<object>();
foreach (string dirFile in dirFiles)
{
filePaths.Add(dirFile);
}
return new ResultOK().Call(interpreter, new List<object> { filePaths });
}
catch(Exception e)
{
Expand Down
2 changes: 1 addition & 1 deletion LSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31005.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LSharp", "LSharp.csproj", "{109C7415-3120-401D-B809-D35899062A55}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LSharp", "LSharp.csproj", "{109C7415-3120-401D-B809-D35899062A55}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"LSharp": {
"commandName": "Project",
"commandLineArgs": "json.ls"
"commandLineArgs": "IO.ls"
}
}
}
Loading

0 comments on commit aae0123

Please sign in to comment.