Dota 2 Workshop Tools/Scripting/API/Global.FileToString: Difference between revisions
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
No edit summary |
m ([FORGOT Summary] Brief description of parameter, added Notes to explain some of the functions behaviour) |
||
Line 26: | Line 26: | ||
* Directory traversal doesn't seem to work. The characters '.', '/' and '\\' are ignored. | * Directory traversal doesn't seem to work. The characters '.', '/' and '\\' are ignored. | ||
* The files are read from C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota_ugc\game\dota\ems | * The files are read from C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota_ugc\game\dota\ems | ||
* The function is used in conjunction with [[Dota_2_Workshop_Tools/Scripting/API/Global. | * The function is used in conjunction with [[Dota_2_Workshop_Tools/Scripting/API/Global.StringToFile|StringToFile]] |
Revision as of 06:19, 9 August 2014

Function Description
string FileToString(string a)
Reads a string from a file to send to script
Parameters
Type | Name | Description |
---|---|---|
string | a | The file name. |
Returns
string - The string stored in the file. If it doesn't exist, returns nil.
Notes
- Directory traversal doesn't seem to work. The characters '.', '/' and '\\' are ignored.
- The files are read from C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\dota_ugc\game\dota\ems
- The function is used in conjunction with StringToFile