WriteFileText

void WriteFileText(String inFileName, String inText)

Description

his function writes the given text inText into a file created and saved on the device / PC.
As the function is Asynchronous, when the file is actually written the callback function void OnWriteFileTextResult(String inFileName, bool inSuccess, bool inAppended)) is called
and it includes the filename, success (read or not) and in this case the inAppended will be returned as false.
You need to override it in your Advanced Scripts to perform what you need in case of failure.

Parameters

The following is a list of parameters the functions receives 

Parameter Type Description
inFileName string The full file path
inText string The text to write in the file


Return Type

string

Overloads

List of overloads for this function

void WriteFileText(String inFileName, String inText, bool inAttachToInterview)

Parameters for overloads:

Parameter Type Description
inFileName string The full file path
inText string The text to write in the file
inAttachToInterview bool 'true' to attach the file to the interview, or 'false' otherwise


Example

WriteFileText("$ROOT$/MyTxtFile.txt", "Good morning.")
will open the file "MyTextFile.txt" that is saved under the Root directory on the device, and write "Good morning" in the file.
If "MyTextFile" doesn't exit, it will be automatically created.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.