Command file.write

The command file.write is used to write to an open file.

Parameters

  1. handle [integer]
    Handle of the opened file.
  2. size [integer]
    Number of bytes to be written.
  3. buffer [string]
    Hexadecimal of the content to be written.

Example


In the example above the file test.txt has been downloaded using the command downloadfile. The file test.txt has been opened for reading (r) by the command file.open.

Note that to find the file size in bytes, for use by the command file.read, we use the command filesystem.filesize.

The result of file.read will be displayed on the display.