Skip to content

File IO Nodes ​

Load, save, and append text files from Blueprints.

Category: Scooter Utilities > File IO

The File IO nodes are simple text file helpers. Every node takes a location that picks the base directory, and a file name relative to that directory.

File Locations ​

LocationDirectory
Project Saved DirectoryYour project's Saved folder.
User Documents FolderThe user's Documents folder. On Android, this is /storage/emulated/0/Documents/.
Project Content DirectoryYour project's Content folder.

The File Name can include subfolders, for example Logs/DebugDump.txt.

Load File To String ​

Reads a text file and returns its contents.

PinDirectionDescription
Load LocationInputThe base directory to load from.
File NameInputThe file to read, including its extension. Example: Config/Settings.txt.
Out StringOutputThe contents of the file.
Out File PathOutputThe full path the node tried to read.
Return ValueOutputtrue if the file was read successfully.

Save Text To File ​

Writes text to a file, replacing any existing contents.

PinDirectionDescription
Save LocationInputThe base directory to save to.
File NameInputThe file to write, including its extension.
ContentInputThe text to write.
Out Full PathOutputThe full path the file was written to.
Return ValueOutputtrue if the file was saved successfully.

WARNING

Save Text To File overwrites existing files without asking. Use Append Text To File to keep existing content.

Append Text To File ​

Adds text to the end of a file, creating the file if it doesn't exist.

PinDirectionDescription
Save LocationInputThe base directory to save to.
File NameInputThe file to append to, including its extension.
ContentInputThe text to append.
Add Line BreakInputWhen enabled (the default), adds a line break after Content.
Out Full PathOutputThe full path the file was written to.
Return ValueOutputtrue if the text was written successfully.

The save and append nodes write UTF-8 text without a byte-order mark and create any missing parent folders. Every node writes a success or failure message, including the full path, to the Output Log.

Examples ​

  • Load a file: Call Load File To String with Load Location set to Project Saved Directory and File Name set to Config/Settings.txt to read from your project's Saved folder.
  • Save a debug dump: Call Save Text To File with Save Location set to Project Saved Directory, File Name set to Logs/DebugDump.txt, and your text as Content. Out Full Path tells you exactly where it went.
  • Save to the user's Documents: Set Save Location to User Documents Folder to write files that live outside your project.

TIP

Pair these nodes with the JSON nodes to save and load structured data, like settings or save games.