Welcome to little lamb

Code » limb » master » tree

[master] / src / doc / allreadwrite.h / allwrite.3.md

% limb manual
% allwrite(3)
% limb 0.1.0
% 2023-07-24

# NAME

allwrite, allwritev - write requested amount of data to a file

# SYNOPSIS

    #include <limb/allreadwrite.h>

```pre hl
size_t allwrite(int <em>fd</em>, const char *<em>data</em>, size_t <em>dlen</em>)
size_t allwritev(int <em>fd</em>, const struct iovec *<em>v</em>, unsigned <em>n</em>)
```

# DESCRIPTION

The `allwrite`() function will attempt to write `dlen` bytes from the memory
pointed by `data` to the file associated with file descriptor `fd`.

The `allwritev`() function is similar only writing data as described by the
array `v` of `n` vectors.

# RETURN VALUE

These functions return the number of bytes written, which may be less than `dlen`
(even 0) in case of error.