Compare commits
1 Commits
f8425b8729
...
669b2b395f
| Author | SHA1 | Date | |
|---|---|---|---|
|
669b2b395f
|
20
TODO.md
20
TODO.md
@@ -355,3 +355,23 @@ lists and no trees, drawing everything from fixed pools by design. A consumer th
|
||||
does allocate would weight §4.1's `open`/`read`/`write` far higher than this one
|
||||
does. The next thing worth doing is porting akbasic onto this release and
|
||||
counting the calls again.
|
||||
|
||||
## Requested by consumers
|
||||
|
||||
1. **No directory-reading wrapper.** There is no `aksl_opendir` / `aksl_readdir` /
|
||||
`aksl_closedir`, so a consumer that wants to list a directory has to call
|
||||
`opendir(3)` itself and step outside the error convention every other call in
|
||||
its file follows — reporting through `errno` where everything around it
|
||||
reports through an `akerr_ErrorContext *`.
|
||||
|
||||
`akbasic` hit this implementing Commodore BASIC's `DIRECTORY` verb, and
|
||||
refuses the verb rather than working around it: `src/runtime_disk.c` reports
|
||||
"DIRECTORY is not implemented: libakstdlib has no directory-reading wrapper
|
||||
yet". The shape it wants is the one the `aksl_f*` family already has — a
|
||||
handle out through a pointer parameter, `NULL` on success, `ENOENT` and
|
||||
`EACCES` propagated as themselves.
|
||||
|
||||
A wrapper would want tests for: a directory that does not exist, one that
|
||||
cannot be searched, an empty one, and one whose entries outlast a single
|
||||
read — plus whatever the `d_type` portability story turns out to be, since
|
||||
not every filesystem fills it in.
|
||||
|
||||
Reference in New Issue
Block a user