BadScript 2
Loading...
Searching...
No Matches
BadIOApi.cs
Go to the documentation of this file.
1using BadScript2.IO;
4
9
13[BadInteropApi("IO", true)]
14internal partial class BadIOApi
15{
19
20
25 public BadIOApi(IFileSystem fileSystem) : this()
26 {
27 m_FileApi = new BadFileApi(fileSystem);
28 m_PathApi = new BadPathApi(fileSystem);
29 m_DirectoryApi = new BadDirectoryApi(fileSystem);
30 }
31
32 protected override void AdditionalData(BadTable target)
33 {
34 BadTable file = new BadTable();
35 BadTable path = new BadTable();
36 BadTable directory = new BadTable();
37 m_FileApi.LoadRawApi(file);
38 m_PathApi.LoadRawApi(path);
39 m_DirectoryApi.LoadRawApi(directory);
40 target.SetProperty("File", file);
41 target.SetProperty("Path", path);
42 target.SetProperty("Directory", directory);
43 }
44}
Public interface for the filesystem abstraction of the BadScript Engine.
static IFileSystem Instance
File System implementation.
Implements the "IO" Api.
Definition BadIOApi.cs:15
override void AdditionalData(BadTable target)
Definition BadIOApi.cs:32
readonly BadFileApi m_FileApi
Definition BadIOApi.cs:17
readonly BadDirectoryApi m_DirectoryApi
Definition BadIOApi.cs:16
readonly BadPathApi m_PathApi
Definition BadIOApi.cs:18
BadIOApi(IFileSystem fileSystem)
Creates a new API Instance.
Definition BadIOApi.cs:25
Implements an Interop API for the BS2 Language.
Implements a Table Structure for the BadScript Language.
Definition BadTable.cs:14
Defines the interface for a file system.
Definition IFileSystem.cs:7
Contains IO Implementation for the BadScript2 Runtime.
Contains IO Extensions and APIs for the BadScript2 Runtime.
Contains the Interop Abstractions and Implementations for the BadScript2 Language.
Contains the Runtime Objects.
Definition BadArray.cs:10