Apple2: Provide a way to get directory file count
The information is available in the directory key block. Providing it to the user as soon as opendir() is done can save them costly code.
This commit is contained in:
committed by
Oliver Schmidt
parent
36132a437b
commit
40d9f3eed5
@@ -332,6 +332,7 @@ usage.
|
||||
<item>_datetime
|
||||
<item>allow_lowercase
|
||||
<item>beep
|
||||
<item>dir_file_count
|
||||
<item>get_ostype
|
||||
<item>gmtime_dt
|
||||
<item>mktime_dt
|
||||
|
||||
@@ -332,6 +332,7 @@ usage.
|
||||
<item>_filetype
|
||||
<item>_datetime
|
||||
<item>beep
|
||||
<item>dir_file_count
|
||||
<item>get_ostype
|
||||
<item>gmtime_dt
|
||||
<item>mktime_dt
|
||||
|
||||
@@ -97,6 +97,7 @@ function.
|
||||
<item>_dos_type
|
||||
<item>allow_lowercase
|
||||
<item><ref id="beep" name="beep">
|
||||
<item><ref id="dir_file_count" name="dir_file_count">
|
||||
<item><ref id="get_ostype" name="get_ostype">
|
||||
<item><ref id="gmtime_dt" name="gmtime_dt">
|
||||
<item><ref id="mktime_dt" name="mktime_dt">
|
||||
@@ -109,6 +110,7 @@ function.
|
||||
<itemize>
|
||||
<item>_dos_type
|
||||
<item><ref id="beep" name="beep">
|
||||
<item><ref id="dir_file_count" name="dir_file_count">
|
||||
<item><ref id="get_ostype" name="get_ostype">
|
||||
<item><ref id="gmtime_dt" name="gmtime_dt">
|
||||
<item><ref id="mktime_dt" name="mktime_dt">
|
||||
@@ -3524,6 +3526,25 @@ used in presence of a prototype.
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>dir_file_count<label id="dir_file_count"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Returns the number of files in the directory.
|
||||
<tag/Header/<tt/<ref id="apple2.h" name="apple2.h">/
|
||||
<tag/Declaration/<tt/unsigned int __fastcall__ dir_file_count(DIR *dir);/
|
||||
<tag/Description/<tt/dir_file_count/ is machine dependent and does not exist for
|
||||
all supported targets. If it exists, it returns the number of active
|
||||
(non-deleted) files in the directory.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function does not exist on all platforms.
|
||||
</itemize>
|
||||
<tag/Availability/cc65 (not all platforms)
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>div<label id="div"><p>
|
||||
|
||||
<quote>
|
||||
|
||||
Reference in New Issue
Block a user