mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-19 10:58:17 +00:00
7e6ca34e2d
The read_dir and glob functions have been logically moved into that new namespace, leaving deprecated versions of them in the `kumo` module. A new `kumo.fs.open` function that works similarly to `io.open` is provided. This function cooperates with the kumo async io scheduler and won't block it if the filesystem is under pressure. It returns file handles that are simlar to the builtin lua file handle objects, but do not support formatting or parsing of writes or reads respectively: the calling code is responsible for that. The rationale for this difference is that is that lua's semantics for those functions are frankly a bit weird and are hard to replicate precisely.
235 B
235 B
Module kumo.fs
This module provides an interface to the filesystem that is aware of kumo's internal event scheduling, and that will avoid blocking threads while waiting for file IO.