ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. fileCopy

Function

fileCopy

Server and clientFilesIdentical to MTA:SA

Copies a file to a new path. An existing target file is overwritten only with overwrite = true.

Syntax

bool fileCopy(string filePath, string copyToFilePath [, bool overwrite = false])

Arguments

filePathstring
Source file.
copyToFilePathstring
Copy path.
overwritebool, optional = false
true = overwrite an existing one.

Returns

true on success.

Example

fileCopy("accounts.json", "backup/accounts.json", true)

See also