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

ParentDir

Declaration

Source position: amigados.pas line 1730

function ParentDir(

  lock: LongInt

):LongInt;

Arguments

lock

  

Lock to get parent directory of.

Function result

Returns a lock to the parent directory or 0, in which case the supplied lock has no parent directory (because it is the root directory) or an error occured. IoErr() returns 0 in the former case and a different value on error.

Description

The argument lock is associated with a given file or directory. ParentDir() returns newlock which is associated the parent directory of lock.

Taking the ParentDir() of the root of the current filing system returns a 0 lock. Note this 0 lock represents the root of file system that you booted from (which is, in effect, the parent of all other file system roots.)

See also

Lock

  

Lock a directory or file

DupLock

  

Duplicate a lock

UnLock

  

Unlock a directory or file

ParentOfFH

  

Returns a lock on the parent directory of a file

DupLockFromFH

  

Gets a lock on an open file


Documentation generated on: 2021-07-30