backends/flint/flint_io.h File Reference

Wrappers for low-level POSIX I/O routines. More...

#include <sys/types.h>
#include "safefcntl.h"
#include "safeunistd.h"

Include dependency graph for flint_io.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool flint_io_sync (int fd)
 Ensure all data previously written to file descriptor fd has been written to disk.
size_t flint_io_read (int fd, char *p, size_t n, size_t min)
 Read n bytes (or until EOF) into block pointed to by p from file descriptor fd.
void flint_io_write (int fd, const char *p, size_t n)
 Write n bytes from block pointed to by p to file descriptor fd.


Detailed Description

Wrappers for low-level POSIX I/O routines.

Definition in file flint_io.h.


Function Documentation

bool flint_io_sync ( int  fd  )  [inline]

Ensure all data previously written to file descriptor fd has been written to disk.

Returns false if this could not be done.

Definition at line 33 of file flint_io.h.

Referenced by FlintTable::commit().

size_t flint_io_read ( int  fd,
char *  p,
size_t  n,
size_t  min 
)

Read n bytes (or until EOF) into block pointed to by p from file descriptor fd.

If less than min bytes are read, throw an exception.

Returns the number of bytes actually read.

Definition at line 30 of file flint_io.cc.

Referenced by FlintVersion::read_and_check(), and FlintTable::read_block().

void flint_io_write ( int  fd,
const char *  p,
size_t  n 
)

Write n bytes from block pointed to by p to file descriptor fd.

Definition at line 51 of file flint_io.cc.

Referenced by FlintVersion::create(), and FlintTable::write_block().


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.