Atari ST series Technical Reference Manual page 136

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

set in Fsfirst() is found, you can obtain information about
additional files with the function Fsnext():
int status;
status = Fsnext();
where status indicates whether another file having the file
specification and attributes given in the Fsfirst() call was
found. If such a file was found, a 0 is returned in status, and
information about the file is stored in the buffer pointed to by
the DTA. If no matching file was found, a DOS error num­
ber such as ENMFIL is returned (see Appendix D). Use of this
call assumes that the DTA points to a buffer that contains
information from a previous Fsfirst() call. The filename used
by the previous Fsfirst() call must also have contained one
or more wildcards (? or *) in order for Fsnext() to succeed.
The amount for free space is another useful bit of infor­
mation you might wish to obtain about a disk. Find this with
the function whose macro name is Dfree(). The function is
called like this:
long buffer[4];
int drivenum;
Dfree(buffer, drivenum);
where drivenum specifies the drive to check (A = 0, B = 1,
and so on). The information about the drive is returned in
four longwords in the buffer array. The information contained
in this array is:
Element Number
0
1
2
3
For large hard drives, this function is extremely slow,
and may take as much as several seconds to complete.
File Manipulation Functions
GEMDOS supports some common file manipulation opera­
tions like deleting a file or renaming it, and some not-so-
common ones, like setting or getting the time and date-
stamp, or file attributes. The function Fdelete() is used to
delete a file. It's called like this:
CHAPTER 6
Contents
Number of free clusters
Total number of clusters on drive
Sector size (in bytes)
Cluster size (in sectors)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents