file

Interact with files.

Files location

Files belong in: C:\Users\Username\AppData\Roaming\Melatonin\CS2 External\Scripts\files

For security reasons, all File API related functions are restricted to one Folder. If you're trying to interact with files or folder outside of this directory it will not work.

Functions:

Read

file.read(string: path)

Returns the contents of that file as a string.

Write

file.write(string: file, string: new_content)

If the file written does not exist, it will be created with the content. However, if the file does exist it will be overwritten with the content.

Last updated