Dota 2 Workshop Tools/Scripting/API/Global.FileToString: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m ([FORGOT Summary] Brief description of parameter, added Notes to explain some of the functions behaviour)
(Dota_Lebot push: Updated Page)
Line 1: Line 1:
{{Note | This page is automatically generated.  Any changes may be overwritten}}
{{Note | This page is automatically generated.  Any changes may be overwritten}}
[[Category:Dota2Function]]
[[Category:Global]]


== Function Description ==
== Function Description ==


''' string FileToString(string ''a'') '''
''' string FileToString(string ''a'') '''


''Reads a ''string'' from a file to send to script''
''Reads a ''string'' from a file to send to script''


== Parameters ==
== Parameters ==
Line 15: Line 20:
| string
| string
| a
| a
| The file name.
| No Description Set
|}
|}


== Returns ==
== Returns ==


''string'' - The string stored in the file. If it doesn't exist, returns nil.
''string'' - No Description Set
 
== 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 [[Dota_2_Workshop_Tools/Scripting/API/Global.StringToFile|StringToFile]]

Revision as of 13:14, 9 August 2014

Note.pngNote: This page is automatically generated. Any changes may be overwritten

Function Description

string FileToString(string a)

Reads a string from a file to send to script


Parameters

Type Name Description
string a No Description Set

Returns

string - No Description Set