BadScript 2
Loading...
Searching...
No Matches
BadDefaultRunSystem.cs
Go to the documentation of this file.
1using BadScript2.IO;
2
7
13{
18 public BadDefaultRunSystem(BadRuntime runtime) : base(runtime) { }
19
21 public override object Parse(string[] args)
22 {
24 {
25 Args = args.Skip(1),
26 };
27 string file = args.First();
28 settings.Files = new[]
29 {
30 file,
31 };
32
34 {
35 return settings;
36 }
37
38 string path = Path.Combine(BadConsoleDirectories.DataDirectory, "subsystems", "run", "apps", file + ".bs");
39
41 {
42 settings.Files = new[]
43 {
44 path,
45 };
46 }
47
48 return settings;
49 }
50}
Exposes the BadScript Runtime Functionality to Consumers.
Definition BadRuntime.cs:28
Static class that contains all the directories used by the console.
static string DataDirectory
The Data Directory.
Default Run System Is used to enable running scripts by simply typing "bs my/path/to/script....
BadDefaultRunSystem(BadRuntime runtime)
Creates a new BadDefaultRunSystem instance.
Runs one or more BadScript scripts.
Public interface for the filesystem abstraction of the BadScript Engine.
static IFileSystem Instance
File System implementation.
bool IsFile(string path)
Returns true if the given path is a file.
Contains the 'run' console command implementation.
Contains IO Implementation for the BadScript2 Runtime.