•  Back 
  •  GEMDOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileDsetpath()
Dgetpath()                                                           GEMDOS

Syntax

LONG Dgetpath( buf, drive )
char *buf;
WORD drive;

Function      Dgetpath() returns the current GEMDOS path specification.

Opcode        71 (0x47)

Availability  All GEMDOS versions.

Parameters    buf is a pointer to a character buffer which will contain
              the current GEMDOS path specification on function exit.
              drive is the number of the drive whose path you want
              returned. drive should be DEFAULT_DRIVE (0) for the current
              GEMDOS drive, 1 for drive 'A:', 2 for drive 'B:', and so on.

Binding       move.w   drive,-(sp)
              pea      buf
              move.w   #47,-(sp)
              trap     #1
              addq.l   #6,sp

Return Value  Dgetpath() will return one of two errors on function exit:
              E_OK   (  0):  Operation successful
              EDRIVE (-46):  Invalid drive specification

Comments      As there is no way to specify the buffer size to this
              function you should allow at least 128 bytes of buffer
              space. This will allow for up to 8 folders deep. Newer file
              systems (CD-ROM drives) may demand up to 200 bytes.

See Also      Dsetpath()