ReferenceFilesystem

item:Write

Replaces the selected file’s contents. This is destructive; the old contents are not retained automatically.

Syntax

item:Write(data: string) -> ()

Parameters

ParameterTypeDescription
datastringNew complete file contents.

Description

Call this method on an item returned by a file dialog. Items belong to the current session and should not be serialized for reuse after reconnecting.

Example

local item = openfiledialog()
if item then
    item:Write("replacement")
end

These are Game executor contracts. Check build requirements and session lifetimes before using them.