1 min read

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

NameValueDescription
Binary0Reads or writes raw bytes with no line-ending transformation, preserving all characters exactly as stored on disk.
Text1Reads 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.

FieldValue
value0

Text

Reads or writes file content with \r\n sequences normalized to \n, ensuring consistent line endings across platforms.

FieldValue
value1