Direct disk access


Section contents


Overview

Defined in

cfile.oxh

Description

<TBS>


Construction / destruction


NewRawDisk - Constructor

Usage

this& = NewRawDisk&:

Description

Creates a raw diskobject and returns a handle which allows the object to be manipulated.

Return Value
this& An value which represents the created raw disk object
Error Handling

If the object could not be created then an error is generated which should be trapped by an ONERR handler.

Example
  LOCAL this&

  this& = NewRawDisk&:
  DeleteRawDisk:(this&) 

DeleteRawDisk - Destructor

Usage

DeleteRawDisk:(BYREF this&)

Description

Destroys the raw disk object.

Arguments
BYREF this& A handle to a raw disk object
Example
  LOCAL this&

  this& = NewRawDisk&:
  DeleteRawDisk:(this&) 

Methods provided


RawDiskClose - close channel to disk

Usage

RawDiskClose:(this&)

Description

Close the channel to the disk.

Arguments
this& A handle to a raw disk object

RawDiskOpen - open channel to disk

Usage

err% = RawDiskOpen:(this&,fs&,drive&)

Description

Open a channel to the disk drive&.

Arguments
this& A handle to a raw disk object
fs& A handle to a file system object
drive& The drive to open
Return value
err% An error code

RawDiskRead - read from disk

Usage

err% = RawDiskRead%:(this&,pos&,des&)

Description

Read bytes from the disk.

Arguments
this& A handle to a raw disk object
pos& The position on the disk to start reading
des& A handle to a descriptor object
Return value
err% An error code

RawDiskWrite - write from disk

Usage

err% = RawDiskWrite%:(this&,pos&,des&)

Description

Write bytes to the disk.

Arguments
this& A handle to a raw disk object
pos& The position on the disk to start writing
des& A handle to a descriptor object
Return value
err% An error code

RawDiskWriteStr - write string to disk

Usage

err% = RawDiskWriteStr%:(this&,pos&,str$)

Description

Write string to the disk.

Arguments
this& A handle to a raw disk object
pos& The position on the disk to start writing
str$ A string
Return value
err% An error code