|
| string | CreateResourceDirectory (string path, bool detectChanges=true) |
| | Adds the specified folder as a valid resource directory for all ResMan requests.
|
| |
| void | DeleteTempResource (string resourceName) |
| | Deletes the temporary resource with the specified name.
|
| |
| IEnumerable< string > | FindResourcesOfType (ResRefType type, bool moduleOnly=true) |
| | Gets all resource names for the specified type.
|
| |
| GffResource? | GetGenericFile (string name, ResRefType type) |
| | Gets the specified Gff resource.
|
| |
| string | GetNSSContents (string scriptName) |
| | Gets the contents of a .nss script file as a string.
|
| |
| byte?[] | GetResourceData (string name, ResRefType type) |
| | Gets the raw data of the specified resource.
|
| |
| string? | GetResourceText (string name, ResRefType type) |
| | Gets the raw text of the specified resource.
|
| |
| bool | IsValidResource (string name, ResRefType type=ResRefType.UTC) |
| | Determines if the supplied resource exists and is of the specified type.
|
| |
| void | WriteTempResource (string resourceName, byte[] data) |
| | Creates a temporary resource with the specified name.
|
| |
| void | WriteTempResource (string resourceName, string text) |
| | Creates a temporary resource with the specified name.
|
| |
|
|
const int | MaxNameLength = 16 |
| |
◆ CreateResourceDirectory()
| string Anvil.Services.ResourceManager.CreateResourceDirectory |
( |
string | path, |
|
|
bool | detectChanges = true ) |
|
inline |
Adds the specified folder as a valid resource directory for all ResMan requests.
- Parameters
-
| path | The path to add. |
| detectChanges | True if changes to the folder contents should be tracked for updates. |
- Returns
- The assigned resman alias for the resource directory.
- Exceptions
-
| ArgumentOutOfRangeException | Thrown if the specified directory does not exist. |
◆ DeleteTempResource()
| void Anvil.Services.ResourceManager.DeleteTempResource |
( |
string | resourceName | ) |
|
|
inline |
Deletes the temporary resource with the specified name.
- Parameters
-
| resourceName | The resource to delete. |
◆ FindResourcesOfType()
| IEnumerable< string > Anvil.Services.ResourceManager.FindResourcesOfType |
( |
ResRefType | type, |
|
|
bool | moduleOnly = true ) |
|
inline |
Gets all resource names for the specified type.
- Parameters
-
| type | A resource type. |
| moduleOnly | If true, only bundled module resources will be returned. |
- Returns
- Any matching ResRef names, otherwise an empty enumeration.
◆ GetGenericFile()
| GffResource? Anvil.Services.ResourceManager.GetGenericFile |
( |
string | name, |
|
|
ResRefType | type ) |
|
inline |
Gets the specified Gff resource.
- Parameters
-
| name | The resource name to fetch, without any filetype extensions. |
| type | The type of the file/resource. |
- Returns
- A GffResource representation of the specified resource if it exists, otherwise null.
◆ GetNSSContents()
| string Anvil.Services.ResourceManager.GetNSSContents |
( |
string | scriptName | ) |
|
|
inline |
Gets the contents of a .nss script file as a string.
- Parameters
-
| scriptName | The name of the script to get the contents of. |
- Returns
- The script file contents or "" on error.
◆ GetResourceData()
| byte?[] Anvil.Services.ResourceManager.GetResourceData |
( |
string | name, |
|
|
ResRefType | type ) |
|
inline |
Gets the raw data of the specified resource.
- Parameters
-
| name | The resource name to retrieve. |
| type | The type of resource to retrieve. |
- Returns
- The raw data of the associated resource, otherwise null if the resource does not exist.
◆ GetResourceText()
| string? Anvil.Services.ResourceManager.GetResourceText |
( |
string | name, |
|
|
ResRefType | type ) |
|
inline |
Gets the raw text of the specified resource.
- Parameters
-
| name | The resource name to retrieve. |
| type | The type of resource to retrieve. |
- Returns
- The raw text of the associated resource, otherwise null if the resource does not exist.
◆ IsValidResource()
| bool Anvil.Services.ResourceManager.IsValidResource |
( |
string | name, |
|
|
ResRefType | type = ResRefType::UTC ) |
|
inline |
Determines if the supplied resource exists and is of the specified type.
- Parameters
-
| name | The resource name to check. |
| type | The type of this resource. |
- Returns
- true if the supplied resource exists and is of the specified type, otherwise false.
◆ WriteTempResource() [1/2]
| void Anvil.Services.ResourceManager.WriteTempResource |
( |
string | resourceName, |
|
|
byte[] | data ) |
|
inline |
Creates a temporary resource with the specified name.
- Parameters
-
| resourceName | The resource name. |
| data | The data to populate in the resource. |
◆ WriteTempResource() [2/2]
| void Anvil.Services.ResourceManager.WriteTempResource |
( |
string | resourceName, |
|
|
string | text ) |
|
inline |
Creates a temporary resource with the specified name.
- Parameters
-
| resourceName | The resource name. |
| text | The text to populate in the resource. |
The documentation for this class was generated from the following file:
- NWN.Anvil/src/main/Services/Resources/ResourceManager.cs