pstore2
Namespaces | Classes | Typedefs | Functions
pstore::file Namespace Reference

The 'file' namespace contains all of the database file management functions and classes . More...

Namespaces

 posix
 A namespace to hold POSIX-specific file interfaces.
 

Classes

class  deleter_base
 A class which, on destruction, will delete a file whose name is passed to the constructor. More...
 
class  file_base
 An abstract file class. Provides the interface for file access. More...
 
class  file_handle
 Implements a portable file access API. More...
 
class  in_memory
 Implements an in-memory file which provides a file-like API to a chunk of pre-allocated memory. More...
 
class  range_lock
 A synchronization object that can be used to protect data in a file from being simultaneously accessed by multiple processes. More...
 
class  system_error
 

Typedefs

using deleter = posix::deleter
 The cross-platform name for the deleter class. More...
 

Functions

std::ostream & operator<< (std::ostream &os, file_handle const &fh)
 
bool exists (std::string const &path)
 Returns true if the file system contains an object at the location given by path. More...
 
void unlink (std::string const &path, bool allow_noent=false)
 Deletes the file system object at the location given by path. More...
 

Detailed Description

The 'file' namespace contains all of the database file management functions and classes .

Typedef Documentation

◆ deleter

The cross-platform name for the deleter class.

This should always be preferred to the platform-specific variation.

Function Documentation

◆ exists()

bool pstore::file::exists ( std::string const &  path)

Returns true if the file system contains an object at the location given by path.

Parameters
pathA location in the file system to be checked.
Returns
true if the file system contains an object at the location given by path. False otherwise.

◆ unlink()

void pstore::file::unlink ( std::string const &  path,
bool  allow_noent = false 
)

Deletes the file system object at the location given by path.

Parameters
pathThe location in the file system of the object to be deleted.
allow_noentIf true, do not raise an error if the file did not exist.