Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

async_io_handle::direntry() and async_io_handle::lstat() are both synchronous functions which block. How then can I get metadata about files and directories asynchronously?

This is easy, if not terribly obvious: call async_enumerate() on the containing directory of the file you want metadata for with a shell glob exactly matching the file name and with the minimum metadata you are looking for. AFIO will then asynchronously fetch that metadata for you, returning it in the future directory_entry returned by enumerate().


PrevUpHomeNext