Scripting API
Scripting API
TextImport
Record in Abyss.Core, from Abyss.Core.
How a text file — a .txt or a .md — is imported, as its inspector's Import As says: as nothing, which every one is until somebody says otherwise, or as a license, whose text every build of the game writes into the third-party notices beside it, under what it covers.
public record TextImportRemarks
Kept in the file's sidecar with its other settings, in its import block: "importAs": "License", and, each only where it was typed, "covers": "Bytesized", "licenseName": "OFL-1.1" and "licenseUrl": "https://…". A file imported as nothing says none of it, so it has the sidecar it always had.
Constructors
TextImport
public TextImport(TextImportAs As, string Covers, string License, string Url)How a text file — a .txt or a .md — is imported, as its inspector's Import As says: as nothing, which every one is until somebody says otherwise, or as a license, whose text every build of the game writes into the third-party notices beside it, under what it covers.
Parameters
As: What it is imported as.Covers: What the license covers, as the notices list it; empty for the folder it is in.License: The license's name, an SPDX name or its own:OFL-1.1; empty for none.Url: Where what it covers comes from; empty for nowhere.
Kept in the file's sidecar with its other settings, in its import block: "importAs": "License", and, each only where it was typed, "covers": "Bytesized", "licenseName": "OFL-1.1" and "licenseUrl": "https://…". A file imported as nothing says none of it, so it has the sidecar it always had.
Properties
As
public TextImportAs As { get; init; }What it is imported as.
Covers
public string Covers { get; init; }What the license covers, as the notices list it; empty for the folder it is in.
License
public string License { get; init; }The license's name, an SPDX name or its own: OFL-1.1; empty for none.
Url
public string Url { get; init; }Where what it covers comes from; empty for nowhere.
Default
public static TextImport Default { get; }What a text file nobody configured is: nothing.
SaysNothing
public bool SaysNothing { get; }Whether it says nothing a file nobody configured does not: what it covers, its name and its address are a license's.
IsLicense
public bool IsLicense { get; }Whether a build writes its text into the notices.
Extensions
public static IReadOnlyList<string> Extensions { get; }The extensions of the files imported as text, lower case with their dot.
Methods
IsText
public static bool IsText(string path)Whether a path is a text file's, by its extension.
Parameters
path
CoversFor
public string CoversFor(string path)What the license covers, as the notices list it: what was typed, or the name of the folder the file is in — Bytesized for fonts/Bytesized/OFL.txt — or, for one in no folder, its own name without its extension.
Parameters
path: The file, by its path under the asset root.
