writeFile()

Parent Previous Next

Use with care a write or system call could damage a User's system.


TW.writeFile(QString filename, QString content)


filename


Is just that.


       relative paths are taken to be relative to the folder containing the
       executing script's file


Other wise you must give a fully qualified path - note if give a path outside the scripts own (sub)-directory tree, or outside the current document or its master (root) document's (sub)-directory tree, the User will need to first have turned on file writing in the Edit/Preferences/Scripting dialogue tab.


You must provide the file extension as a part of the filename


content


Writing is performed in utf8 encoded text-mode.


Return Value


writeFile returns an integer directly (not an object like readFile does)


The integer is the same as readFile's "status" value see Return Values for Status


Use with care a write or system call could damage a User's system.

Created with the Personal Edition of HelpNDoc: Full featured Documentation generator