Unit 'AmigaDOS' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

dosWrite

Write bytes of data to a file

Declaration

Source position: amigados.pas line 1640

function dosWrite(

  fileh: LongInt;

  buffer: Pointer;

  length: LongInt

):LongInt;

Arguments

buffer

  

Pointer to a buffer to write to file

length

  

Number of bytes to write. The filesystem is advised to try to fulfill the request as good as possible.

Function result

Number of bytes written, -1 for error.

Description

DosWrite() writes bytes of data to the opened file file. length indicates the length of data to be transferred; buffer is a pointer to the buffer. The value returned is the length of information actually written. So, when length is greater than zero, the result is the number of characters written. Errors are indicated by a value of -1.

See also

DosRead

  

Read bytes of data from a file

DosSeek

  

Set the current position for reading and writing

DosOpen

  

Open a file for input or output

DosClose

  


Documentation generated on: 2021-07-30