Skip to main content
Skip table of contents

(v13) abort_file close a file descriptor abnormally

This page applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP

TEXT
  int32 abort_file (
  DEVICELIST *dev,
  DEVICE_FILEDESCRIPTOR descriptor );

This routine, like close_file , breaks the connection between a descriptor and the underlying file. After a descriptor has been closed, the descriptor's value is free to be returned by a future open call on this device.

This function is called when the file is being closed due to some abnormal condition. The implication is that something went wrong, and that the data being read, or already written, will not be used. Thus, it is not necessary, nor indeed desirable, to flush any data waiting to be written. If the file was created when opened for writing, it might be appropriate to delete the file after closing it in this routine.

In general, this routine should close a file as quickly as possible and do any consequent tidying up. If it succeeds, it should return 0 ; otherwise, it should return -1 .

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.