xapian-core  1.4.19
Functions
fileutils.h File Reference

File and path manipulation routines. More...

#include <string>
+ Include dependency graph for fileutils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void removedir (const std::string &dirname)
 Remove a directory, and its contents. More...
 
void resolve_relative_path (std::string &path, const std::string &base)
 Resolve path relative to base. More...
 

Detailed Description

File and path manipulation routines.

Definition in file fileutils.h.

Function Documentation

◆ removedir()

void removedir ( const std::string &  dirname)

Remove a directory, and its contents.

If dirname doesn't refer to a file or directory, no error is generated.

Note - this doesn't currently cope with directories which contain subdirectories.

Definition at line 50 of file fileutils.cc.

References dirent::d_name, name, opendir(), and readdir().

Referenced by Xapian::DatabaseReplica::Internal::apply_db_copy(), and Xapian::DatabaseReplica::Internal::remove_offline_db().

◆ resolve_relative_path()

void resolve_relative_path ( std::string &  path,
const std::string &  base 
)

Resolve path relative to base.

Return path qualified to work as if you did "chdir(<directory which base is in>)" first.

Definition at line 105 of file fileutils.cc.

Referenced by r_r_p(), and read_stub_file().