FileService
Read and write files on your disk from a script: load data, save results, check what is there.
FileService is a service in Root's Services: get it with game:GetService("FileService"). ReadFile(path) returns a buffer, WriteFile(path, data) writes one and makes any missing parent folders, and GetFileType(path) answers "FILE", "FOLDER" or "NONE". Relative paths start from Stroke Engine's own folder.
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| GetFileType | (path: string) | "FILE" | "FOLDER" | "NONE" | Says whether a path is a file, a folder or nothing. |
| ReadFile | (path: string) | buffer | Reads a file into a buffer. |
| WriteFile | (path: string, data: buffer) | () | Writes a buffer to a file, creating its parent folders. |
