v9.0 (2011)
Reads an ASCII or unicode text file into a string, using the same logic that is used in the Softimage script editor to appropriately detect and read the file type.
String XSIUtils.ReadTextFile( String in_Path ); |
oString = XSIUtils.ReadTextFile( in_path ); |
The content of the file as a String, potentially containing unicode characters
Parameter | Type | Description |
---|---|---|
in_path | String | Path to the existing text file. |
var file_path = XSIUtils.BuildPath( XSIUtils.Environment("XSI_USERHOME"), "MyTextTestFile.txt" ); var test_text = "Hello, world!"; try { XSIUtils.WriteUTF16TextFile( file_path, test_text ); Application.LogMessage( XSIUtils.ReadTextFile( file_path ) ); } catch (e) { } |