Atari ST series Technical Reference Manual page 131

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

keeps a default directory path for each drive in the system.
The Dsetpath() function is the one used to set a default di­
rectory for the current drive:
int status;
char '''path;
status = Dsetpath(path)
where path is a pointer to a null-terminated ASCII string
specifying the default directory path to set for the current de­
fault drive (foe example, WORDPRO\FRED\LETTERS). If the
path name begins with a drive letter and a colon, the path is
set for that drive rather than the current default drive (for in­
stance, C:\DATABASE\CLIENTS).
Once a default directory path has been set, you can use
the Dgetpath() function to find that path setting:
word drivenum;
char ^buffer;
Dgetpath(buffer, drivenum);
where drivenum is the drive number (0-15) of the disk whose
default directory path you wish to find. An ASCII string con­
taining the path name is returned in buffer. Since GEMDOS
does not specify a maximum length for path names, make
sure to supply a buffer large enough to contain the whole
name. A buffer of about 128 bytes should be big enough, un­
less the path goes down through more than ten levels of
subdirectories.
The last two directory path functions are those used to
create or delete a subdirectory. The Dcreate() function is
used to create a new subdirectory. The syntax used to call
this function is:
int status;
char "pathname;
status = Dcreate(pathname);
where pathname is a pointer to a null-terminated ASCII direc­
tory path (for example, C:\NEWDIR). If GEMDOS is able to
create the directory, a 0 is returned in status, otherwise, a
negative GEMDOS error number is returned. This function
will fail if some part of the path name doesn't exist, the
named subdirectory already exists, or the parent directory is
the root directory of a disk, all of whose directory entries
have been used.
GEMDOS File System Functions

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents