Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#aros]

ReadLink

Reads the path for a soft filesystem link

Declaration

Source position: amigados.pas line 2272

function ReadLink(

  Port: PMsgPort;

  Lock: LongInt;

  const Path: PChar;

  Buffer: PChar;

  Size: LongWord

):LongBool;

Arguments

Port

  

MsgPort of the filesystem

Lock

  

Lock this path is relative to on the filesystem

Buffer

  

Pointer to buffer for new path from handler.

Size

  

Size of buffer.

Function result

>= 0
Length of resolved filename in case of success
= -1
Failure, see IoErr() for more information
= -2
Buffer size was too small to store resolved filename

Description

ReadLink() takes a lock/name pair (usually from a failed attempt to use them to access an object with packets), and asks the filesystem to find the softlink and fill buffer with the modified path string. You then start the resolution process again by calling GetDeviceProc() with the new string from ReadLink().

Soft-links are resolved at access time by a combination of the filesystem (by returning ERROR_IS_SOFT_LINK to dos), and by Dos (using ReadLink() to resolve any links that are hit).

See also

MakeLink

  

Creates a filesystem link

DosOpen

  

Open a file for input or output

Lock

  

Lock a directory or file

GetDeviceProc

  

Finds a handler to send a message to


Documentation generated on: 2021-07-30