addonFiles: Difference between revisions

From Bohemia Interactive Community
m (Some wiki formatting)
(added 2.22 changes)
 
Line 9: Line 9:
{{Feature|informative|Querying protected {{hl|.ebo}} addons will return an empty array {{hl|[]}}.}}
{{Feature|informative|Querying protected {{hl|.ebo}} addons will return an empty array {{hl|[]}}.}}


|s1= [[addonFiles]] [pboPrefix, fileExtension]
|s1= [[addonFiles]] [prefix, fileExtension]


|p1= pboPrefix: [[String]] - addon prefix available from [[allAddonsInfo]]
|p1= prefix: [[String]] - addon prefix available from [[allAddonsInfo]]. Since {{GVI|arma3|2.22}} it is possible to also return all files present in a scenario folder from within [[Eden Editor]] or Eden preview with the special prefix {{hl|$mission}}


|p2= fileExtension: [[String]] - (Optional) file extension to filter results, for example {{hl|".paa"}}
|p2= fileExtension: [[String]] - (Optional) file extension to filter results, for example {{hl|".paa"}}
Line 29: Line 29:
]
]
*/
*/
</sqf>
|x2= <sqf>
// Since Arma 3 2.22
addonFiles ["$mission", ".sqf"];
</sqf>
</sqf>


|seealso= [[allAddonsInfo]]
|seealso= [[allAddonsInfo]]
}}
}}

Latest revision as of 16:02, 20 March 2026

Hover & click on the images for description

Description

Description:
Returns a list of files present in the addon.
Querying protected .ebo addons will return an empty array [].
Groups:
Mods and Addons

Syntax

Syntax:
addonFiles [prefix, fileExtension]
Parameters:
prefix: String - addon prefix available from allAddonsInfo. Since Arma 3 logo black.png 2.22 it is possible to also return all files present in a scenario folder from within Eden Editor or Eden preview with the special prefix $mission
fileExtension: String - (Optional) file extension to filter results, for example ".paa"
Return Value:
Array of Strings

Examples

Example 1:
addonFiles ["a3\3den\", ".paa"]; /* [ "a3\3den\data\attributes\formation\ech_left_ca.paa", "a3\3den\data\attributes\formation\stag_column_ca.paa", "a3\3den\data\attributes\stance\down_ca.paa", "a3\3den\data\cfg3den\layer\icondisabled_ca.paa", "a3\3den\data\controlsgroups\diagmousecontrol\mouse_ca.paa", ... ] */
Example 2:
// Since Arma 3 2.22 addonFiles ["$mission", ".sqf"];

Additional Information

See also:
allAddonsInfo

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note