We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5080c9a + 5e739e8 commit 8a34e3cCopy full SHA for 8a34e3c
src/io/files.js
@@ -1194,9 +1194,19 @@ p5.PrintWriter = function(filename, extension) {
1194
this.content += data + '\n';
1195
};
1196
/**
1197
- * Flushes the PrintWriter object
+ * Clears the data already written to the PrintWriter object
1198
* @method flush
1199
* @example
1200
+ * <div class ="norender"><code>
1201
+ * // create writer object
1202
+ * var writer = createWriter('newFile.txt');
1203
+ * writer.write(['Flush me']);
1204
+ * // flush writer object here
1205
+ * writer.flush();
1206
+ * // close writer
1207
+ * writer.close();
1208
+ * </code></div>
1209
+ *
1210
*/
1211
this.flush = function() {
1212
this.content = '';
0 commit comments