lovr.filesystem.write
EditWrite to a file in the save directory.
success, error = lovr.filesystem.write(filename, content)Arguments
| Name | Type | Description |
| filename | string | The file to write to. |
| content | string | Blob | A string or Blob to write to the file. |
Returns
| Name | Type | Description |
| success | boolean | Whether the write was successful. |
| error | string | The error message, if there was an error. |
Notes
If the file does not exist, it is created.
If the file already has data in it, it will be replaced with the new content.
If the path contains subdirectories, all of the parent directories need to exist first or the write will fail. Use lovr.filesystem.createDirectory to make sure they're created first.