|
xapian-core
1.4.29
|
Helper functions for database handling. More...
#include <config.h>#include "databasehelpers.h"#include "backends.h"#include "glass/glass_defs.h"#include "io_utils.h"#include "omassert.h"#include "posixy_wrapper.h"#include <algorithm>#include <cstring>#include <string>#include <sys/types.h>#include "safesysstat.h"#include "safeunistd.h"
Include dependency graph for databasehelpers.cc:Go to the source code of this file.
Functions | |
| int | test_if_single_file_db (const struct stat &sb, const string &path, int *fd_ptr) |
| Probe if a path is a single-file database. More... | |
Helper functions for database handling.
Definition in file databasehelpers.cc.
| int test_if_single_file_db | ( | const struct stat & | sb, |
| const std::string & | path, | ||
| int * | fd_ptr | ||
| ) |
Probe if a path is a single-file database.
| sb | struct statbuf from calling stat() on path |
| path | path to probe |
| fd_ptr | used to return fd open of path (unless BACKEND_UNKNOWN is returned) |
Definition at line 45 of file databasehelpers.cc.
References Assert, BACKEND_GLASS, BACKEND_UNKNOWN, close(), GLASS_MIN_BLOCKSIZE, io_read(), O_BINARY, posixy_open, and S_ISREG.
Referenced by Xapian::Database::check_(), and Xapian::Database::Database().