Skip to main content

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

NameTypeDescription
fileNamestringThe 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

NameTypeDescription
fileNamestringThe name of the file
contentstringThe text content to be written

WriteBytes(string, byte[])

Writes the provided byte array content to the specified file.

Parameters

NameTypeDescription
fileNamestringThe name of the file
contentbyte[]The byte array content to be written

ReadText(string): string

Reads and returns the text content from the specified file.

Parameters

NameTypeDescription
fileNamestringThe 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

NameTypeDescription
fileNamestringThe name of the file

Returns

The byte array content of the file.