ES3.RenameFile

public static void RenameFile(string oldFilePath, string newFilePath, ES3Settings oldSettings, ES3Settings newSettings)

Description

Renames a file, using the ES3Settings provided to override any default settings.

It will throw a FileNotFoundException if the file you are renaming does not exist, and throw an IOException if the new file already exists. You can use ES3.FileExists to check beforehand whether these files exist.

Parameters

oldFilePath [Optional] The relative or absolute path of the file we want to rename from.

newFilePath

[Optional]  The relative or absolute path of the file we want to rename to.

oldSettings

[Optional]  The settings we want to use when renaming the old file.

newSettings

[Optional]  The settings we want to use when creating the renamed version.

Examples

C#

JS