IMoBroFileManager
The IMoBroFileManager provides an easy and efficient way for plugins to manage files. Files are automatically stored
in the plugin's data directory.
Functions
Exists(string): bool
Checks whether a specified file exists in the plugin's data directory.
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | string | The name of the file |
Returns
true: If the file exists.false: If the file does not exist.
WriteText(string, string)
Writes the provided text content to the specified file.
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | string | The name of the file |
| content | string | The text content to be written |
WriteBytes(string, byte[])
Writes the provided byte array content to the specified file.
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | string | The name of the file |
| content | byte[] | The byte array content to be written |
ReadText(string): string
Reads and returns the text content from the specified file.
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | string | The name of the file |
Returns
The text content of the file as a string.
ReadBytes(string): byte[]
Reads and returns the byte array content from the specified file.
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | string | The name of the file |
Returns
The byte array content of the file.