-
Notifications
You must be signed in to change notification settings - Fork 10
LUA API v2 Legacy Files
Aranaktu edited this page Aug 10, 2026
·
2 revisions
Provides access to the legacy files.
List of functions for managing legacy files
Check if legacy file exist
Declaration
bool LegacyFileExist(string fpath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fpath | file path |
Returns
Retruns true if legacy file exist
Example
local fpath = "data/db/fifa_ng_db.db"
if LegacyFileExist(fpath) then
-- Export on Desktop if file exist
if LegacyFileExport(fpath) then
print(string.format("File %s exported on Desktop", fpath))
else
print(string.format("File %s export failed", fpath))
end
else
print(string.format("File %s not exist", fpath))
end
Export legacy file
Declaration
bool LegacyFileExport(string fpath, string outpath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fpath | file path |
| string | outpath | (optional) Location where exported file should be saved. If not provided file will be exported on Desktop |
Returns
Retruns true if legacy file exported successfully
Example
local fpath = "data/db/fifa_ng_db.db"
if LegacyFileExist(fpath) then
-- Export on Desktop if file exist
if LegacyFileExport(fpath) then
print(string.format("File %s exported on Desktop", fpath))
else
print(string.format("File %s export failed", fpath))
end
else
print(string.format("File %s not exist", fpath))
end
Support this project on patreon.com/xAranaktu