Dynamic std::string buffers

April 21, 2026 ยท View on GitHub

RAII std::string buffers are used for all C++ string representations of paths, and are automatically freed. std::string buffers are dynamically sized according to the system maximum path length and the actual path length. A few functions pre-allocate the maximum system path length using fs_get_max_path() because the underlying functions don't return the actual path length. The length of the path returned is shortened to the actual path length.

These functions are: