13 #ifndef __PROCESS_IO_HPP__ 14 #define __PROCESS_IO_HPP__ 36 #ifndef ENABLE_LIBWINIO 41 #endif // ENABLE_LIBWINIO 167 const std::vector<lambda::function<
void(
const std::string&)>>& hooks = {});
172 #endif // __PROCESS_IO_HPP__ const short READ
A possible event while polling.
Definition: io.hpp:34
Try< Bytes > size(const std::string &path, const FollowSymlink follow=FollowSymlink::FOLLOW_SYMLINK)
Definition: stat.hpp:130
const size_t BUFFERED_READ_SIZE
Buffered read chunk size.
Definition: io.hpp:48
Try< Nothing > prepare_async(int_fd fd)
Prepares a file descriptor to be ready for asynchronous IO.
Future< short > poll(int_fd fd, short events)
Returns the events (a subset of the events specified) that can be performed on the specified file des...
Future< Nothing > redirect(int_fd from, Option< int_fd > to, size_t chunk=4096, const std::vector< lambda::function< void(const std::string &)>> &hooks={})
Redirect output from the 'from' file descriptor to the 'to' file descriptor (or /dev/null if 'to' is ...
Future< size_t > write(int_fd fd, const void *data, size_t size)
Performs a single non-blocking write by polling on the specified file descriptor until data can be be...
const short WRITE
A possible event while polling.
Definition: io.hpp:40
Definition: executor.hpp:48
Try< bool > is_async(int_fd fd)
Checks if io::prepare_async has been called on the file descriptor.
Future< size_t > read(int_fd fd, void *data, size_t size)
Performs a single non-blocking read by polling on the specified file descriptor until any data can be...
int int_fd
Definition: int_fd.hpp:35
Definition: future.hpp:58