Roblox UtilitiesDevlHub Roblox Documentation

Enum

FileMode

Controls whether FileSystemService normalizes line endings when reading or writing files.

The FileMode enum is passed to FileSystemService:ReadFile() and 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 2#

NameValueSummary
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.