Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
FileMode
The FileMode enum is passed to Class.FileSystemService:ReadFile() and Class.FileSystemService:WriteFile() to control line-ending handling. FileMode.Text normalizes \r\n sequences to \n on both read and write, ensuring consistent cross-platform behavior when working with text content. FileMode.Binary performs no transformation, preserving every byte exactly as stored on disk.
Items
| Name | Value | Description |
|---|---|---|
| Binary | 0 | Reads or writes raw bytes with no line-ending transformation, preserving all characters exactly as stored on disk. |
| Text | 1 | Reads or writes file content with \r\n sequences normalized to \n, ensuring consistent line endings across platforms. |
Binary
Reads or writes raw bytes with no line-ending transformation, preserving all characters exactly as stored on disk.
| Field | Value |
|---|---|
| value | 0 |
Text
Reads or writes file content with \r\n sequences normalized to \n, ensuring consistent line endings across platforms.
| Field | Value |
|---|---|
| value | 1 |