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

NewReadLink

Read the filename referred to by the soft-linked object

Declaration

Source position: amigados.pas line 2299

function NewReadLink(

  Port: PMsgPort;

  Lock: LongInt;

  Path: PChar;

  Buffer: PByte;

  Size: LongInt

):LongInt;

Arguments

Port

  

The handler to send the request to.

Lock

  

Object that path is relative to.

Path

  

Name of the object that caused the error.

Buffer

  

Buffer to fill with resolved filename.

Size

  

Length of the buffer.

Function result

> 0 success, actual length of the returned string; 0 failure, probably ERROR_NOT_IMPLEMENTED.; -1 failure, see IoErr() for more information. -2 failure, not enough space in the buffer.

Description

Read the filename referred to by the soft-linked object contained in path (relative to the lock lock) into the buffer buffer. The variable path should contain the name of the object that caused the original OBJECT_IS_SOFT_LINK error. Unlike original ReadLink, NewReadLink works on hardlinks aswell as softlinks.

Errors

Before dos 51.41 the filesystems not implementing this functionality would result in IoErr() not being set. This was fixed in dos 51.41 which now consistently sets IoErr() to ERROR_NOT_IMPLMENTED in this case.

See also

ReadLink

  

Reads the path for a soft filesystem link


Documentation generated on: 2021-07-30