Demo API test script.
#1
21 Apr 2026, 05:39
Here's the source code for demoapitest command
DemoApiLib.Separator();
// ?? 5. Table Formatting ????????????????????????????????????
DemoApiLib.PrintHeader("5. Table Formatting");
Console.WriteLine(" " + DemoApiLib.TableRow(
("NAME", 15), ("TYPE", 6), ("SIZE", 10)));
Console.WriteLine(" " + DemoApiLib.TableRow(
("?????????????", 15), ("??????", 6), ("??????????", 10)));
// Show first 5 files from /bin
int shown = 0;
foreach (var path in csFiles.Take(5))
{
string name = api.NodeName(path);
string ext = DemoApiLib.GetExtension(path);
int size = api.GetSizeAbsolute(path);
Console.WriteLine(" " + DemoApiLib.TableRow(
(name, 15), (ext, 6), (size + "B", 10)));
shown++;
}
if (csFiles.Length > shown)
Console.WriteLine($" ... and {csFiles.Length - shown} more");
DemoApiLib.Separator();
// ?? Done ???????????????????????????????????????????????????
DemoApiLib.PrintHeader("Demo Complete");
DemoApiLib.PrintOk("The #include directive lets scripts share code.");
DemoApiLib.PrintInfo("Create your own libraries in /lib/");
DemoApiLib.PrintInfo("Include them with: #include <yourlib>");
DemoApiLib.Separator();
return 0;
}
}