Functions | |
ssize_t | jread (jfs_t *fs, void *buf, size_t count) |
Read from the file. | |
ssize_t | jpread (jfs_t *fs, void *buf, size_t count, off_t offset) |
Read from the file at the given offset. | |
ssize_t | jreadv (jfs_t *fs, const struct iovec *vector, int count) |
Read from the file into multiple buffers. | |
ssize_t | jwrite (jfs_t *fs, const void *buf, size_t count) |
Write to the file. | |
ssize_t | jpwrite (jfs_t *fs, const void *buf, size_t count, off_t offset) |
Write to the file at the given offset. | |
ssize_t | jwritev (jfs_t *fs, const struct iovec *vector, int count) |
Write to the file from multiple buffers. | |
int | jtruncate (jfs_t *fs, off_t length) |
Truncates the file to the given length. | |
off_t | jlseek (jfs_t *fs, off_t offset, int whence) |
Reposition read/write file offset. |
ssize_t jread | ( | jfs_t * | fs, | |
void * | buf, | |||
size_t | count | |||
) |
Read from the file.
Works just like UNIX read(2).
fs | file to read from | |
buf | buffer used to store the data | |
count | maximum number of bytes to read |
ssize_t jpread | ( | jfs_t * | fs, | |
void * | buf, | |||
size_t | count, | |||
off_t | offset | |||
) |
Read from the file at the given offset.
Works just like UNIX pread(2).
fs | file to read from | |
buf | buffer used to store the data | |
count | maximum number of bytes to read | |
offset | offset to read at |
ssize_t jreadv | ( | jfs_t * | fs, | |
const struct iovec * | vector, | |||
int | count | |||
) |
Read from the file into multiple buffers.
Works just like UNIX readv(2).
fs | file to read from | |
vector | buffers used to store the data | |
count | maximum number of bytes to read |
ssize_t jwrite | ( | jfs_t * | fs, | |
const void * | buf, | |||
size_t | count | |||
) |
Write to the file.
Works just like UNIX write(2).
fs | file to write to | |
buf | buffer used to read the data from | |
count | maximum number of bytes to write |
ssize_t jpwrite | ( | jfs_t * | fs, | |
const void * | buf, | |||
size_t | count, | |||
off_t | offset | |||
) |
Write to the file at the given offset.
Works just like UNIX pwrite(2).
fs | file to write to | |
buf | buffer used to read the data from | |
count | maximum number of bytes to write | |
offset | offset to write at |
ssize_t jwritev | ( | jfs_t * | fs, | |
const struct iovec * | vector, | |||
int | count | |||
) |
Write to the file from multiple buffers.
Works just like UNIX writev(2).
fs | file to write to | |
vector | buffers used to read the data from | |
count | maximum number of bytes to write |
int jtruncate | ( | jfs_t * | fs, | |
off_t | length | |||
) |
Truncates the file to the given length.
Works just like UNIX ftruncate(2).
fs | file to truncate | |
length | lenght to truncate to |
off_t jlseek | ( | jfs_t * | fs, | |
off_t | offset, | |||
int | whence | |||
) |
Reposition read/write file offset.
Works just like UNIX lseek(2).
fs | file to change the offset to | |
offset | offset to set | |
whence | where to count offset from, can be SEEK_SET to count from the beginning of the file, SEEK_CUR to count from the current position, or SEEK_END to count from the end. |