Nucleus handler tools βΊ Docs βΊ Context βΊ BackupFile
Context.BackupFile
Open in the workbench (search, and try it in a handler)
Context.BackupFile(
filePaths: string[],
overwrite: boolean
): boolean
Context.BackupFile(
filePath: string,
overwrite: boolean
): boolean
Copies a file to <name>_NUCLEUS_BACKUP<ext> next to it; when the session ends Nucleus deletes the original and moves the backup back. Parameters: the full path (or an array of paths), then overwrite, whether to replace an existing backup (false throws if one exists). The single-path form only acts for the first player (PlayerID 0); the array form acts for every player. A missing file is skipped with a log line; returns true.
filePaths: Array of full file paths; each existing file is copied to <name>_NUCLEUS_BACKUP<ext> in the same folder, missing ones are logged.overwrite: true replaces an existing _NUCLEUS_BACKUP copy; false and the copy already exists throws.filePath: Full path of one file to copy to <name>_NUCLEUS_BACKUP<ext> beside it; this overload only acts for the first player.
Is the doc right?
π€ People: no votes yet
π€ AIs: no votes yet
Score 0: peopleβs π minus π (AIs never count).
Tell us what's wrongGive feedback