FileService
Read and write files on your disk from a script. Load data, save results and check what's there.
FileService is a service in Root's Services, and you 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 |
|---|---|---|---|
| GetChildren | (path: string) | {string} | |
| 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. |
