addonFiles: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)]]" to "{{GameCategory|arma3|Scripting Commands}}")
(added 2.22 changes)
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 2.00


|2.00 |Game version=
|gr1= Mods and Addons


|gr1= Mods and Addons |GROUP1=
|descr=Returns a list of files present in the addon.<br>
____________________________________________________________________________________________
{{Feature|informative|Querying protected {{hl|.ebo}} addons will return an empty array {{hl|[]}}.}}


|Returns a list of files present in the addon.<br>
|s1= [[addonFiles]] [prefix, fileExtension]
{{Informative|Querying protected <tt>.ebo</tt> addons returns empty array <tt>[]</tt>.}}|DESCRIPTION=
____________________________________________________________________________________________


|s1= [[addonFiles]] [pboPrefix, fileExtension] |SYNTAX=
|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}}


|p1= [pboPrefix, fileExtension] - [[Array]] |PARAMETER1=
|p2= fileExtension: [[String]] - (Optional) file extension to filter results, for example {{hl|".paa"}}
|p2= pboPrefix: [[String]] - addon prefix available from [[allAddonsInfo]]|PARAMETER2=


|p3= fileExtension (Optional): [[String]] - file extension to filter results, for example <tt>".paa"</tt> |PARAMETER3=
|r1= [[Array]] of [[String]]s


|r1= [[Array]] of [[String]]s|RETURNVALUE=
|x1= <sqf>
 
addonFiles ["a3\3den\", ".paa"];
____________________________________________________________________________________________
/*
 
|x1= <code>[[addonFiles]] ["a3\3den\", ".paa"];
{{codecomment|/*
[
[
"a3\3den\data\attributes\formation\ech_left_ca.paa",
"a3\3den\data\attributes\formation\ech_left_ca.paa",
Line 34: Line 28:
...
...
]
]
<nowiki>*</nowiki>/}}</code>|EXAMPLE1=
*/
____________________________________________________________________________________________
</sqf>
 


|seealso= [[allAddonsInfo]] |SEEALSO=
|x2= <sqf>
// Since Arma 3 2.22
addonFiles ["$mission", ".sqf"];
</sqf>


|seealso= [[allAddonsInfo]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
{{GameCategory|arma3|Scripting Commands}}
[[Category:Command_Group: Mods_and_Addons|{{uc:{{PAGENAME}}}}]]

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