Static methods
staticappendText(baseText:String, id:String, theDir:String, getModText:(String, String) ‑> String, ?parseRules:ParseRules):String
staticfilterASCII(str:String):String
Filters a unicode string to only contain characters that are valid in a filename.
staticlistAllParentDirs(filePath:String):Array<String>
For a given file, return a list of all its parent directories.
Parameters:
filePath |
---|
Returns:
Array
staticmergeAndAppendText(baseText:String, id:String, dirs:Array<String>, getModText:(String, String) ‑> String, fileSystem:IFileSystem, ?parseRules:ParseRules):String
staticmergeText(baseText:String, id:String, theDir:String = "", getModText:(String, String) ‑> String, ?parseRules:ParseRules):String
Looks for a '_merge' entry for an asset and tries to merge its contents into the original With the following rules: - Only applies to XML, TSV, and CSV files (identified by extension) - Adds single nodes from the merged asset into the original - If the original has that node too, it overwrites the original information @return
Parameters:
baseText | the basic text file you're merging extra content into |
---|---|
id | the name of the asset file |
getModText | a function for getting the mod's contribution |
mergeRules | formatting rules to help with merging |
staticstripXML(txt:String, stripHeader:Bool = true, stripFooter:Bool = true, ?headers:Array<String>, ?footers:Array<String>):String
staticuCat(a:String, b:String):String
String concatenation with UTF-8 compatibility.
Parameters:
a | |
---|---|
b |
Returns:
String
staticunzipBytes(compressedBytes:Bytes):Bytes
Runs the 'Inflate' decompression algorithm on the raw compressed bytes and returns the uncompressed data.
Parameters:
bytes | A raw block of compressed bytes |
---|
Returns:
A raw block of uncompressed bytes