runMACS
 All Data Structures Files Functions Variables Enumerations Enumerator Macros
Public Member Functions
StorageManager Class Reference

Handles storage locations. More...

#include <StorageManager.h>

Public Member Functions

 StorageManager (double minFreeThreshold_=.05)
 Construct a StorageManager. More...
 
void addStorageLocation (const std::string &path)
 Add a new storage location. More...
 
std::string getPreferredStorageLocation ()
 Ask for a good location to store data. More...
 

Detailed Description

Handles storage locations.

Multiple storage locations can be given to the StorageManager, which returns preferred storage location for a given request based on the available disk space at the managed locations.

Definition at line 43 of file StorageManager.h.

Constructor & Destructor Documentation

StorageManager::StorageManager ( double  minFreeThreshold_ = .05)

Construct a StorageManager.

Parameters
minFreeThreshold_fraction of disk space to be free to consider the location

Definition at line 26 of file StorageManager.cpp.

Member Function Documentation

void StorageManager::addStorageLocation ( const std::string &  path)

Add a new storage location.

Parameters
pathPath to the location to add

Definition at line 30 of file StorageManager.cpp.

std::string StorageManager::getPreferredStorageLocation ( )

Ask for a good location to store data.

Returns
Path to the preferred storage location

Definition at line 37 of file StorageManager.cpp.


The documentation for this class was generated from the following files: