SaveGame.Move

Description

Moves a identifier to another identifier, also, can be used for Renaming.

You can move folders and files, here is the conditions:

If the first identifier is a file and the second one is a file and the second file is exists, then the second identifier will be replaced.

If the first identifier is a file and the second one is a file and the second file is not exists, then the first identifier will be renamed.

If the first identifier is a file and the second one is a folder, then the first identifier will be moved into the folder.

If the first identifier is a folder and the second one is a folder and the second folder is exists, then the first identifier will be moved into the second folder.

If the first identifier is a folder and the second one is a folder and the second folder is not exists, then the first identifier will be renamed.

Parameters

Name Type Description Required
fromIdentifier string The identifier to move from required
toIdentifier string The identifier to move to required
settings SaveGameSettings The optional settings optional

Examples

Moving Simple Identifier

SaveGame.Move ( "simple.txt", "simple-new.txt" );

Moving to Folder

SaveGame.Move ( "simple.txt", "myFolder" );

Moving Folder

SaveGame.Move ( "myFolder", "myNewFolder );

Moving to Folder with Custom Name

SaveGame.Move ( "simple.txt", "myFolder/simple-new.txt" );