39 # define __attribute__(x) 55 namespace persistence {
79 storage->setPolicy(policy);
81 storage->setPersistLocation(location);
84 storage->setRetrieveLocation(location);
96 if (pos == std::string::npos)
return;
101 int ret = ::stat(dirName.
c_str(), &buf);
103 if (ret == -1 && errno == ENOENT) {
107 ret = ::mkdir(dirName.
c_str(), 0777);
110 if (ret == -1 && errno != EEXIST) {
112 dirName +
": Error creating directory = " +
std::strerror(errno));
115 else if (ret == -1) {
118 dirName +
": Error searching for directory = " +
std::strerror(errno));
120 else if (!S_ISDIR(buf.st_mode)) {
123 dirName +
": Non-directory in path");
table::Key< std::string > name
Class for logical location of a persisted Persistable instance.
Interface for StorageRegistry class.
Include files required for standard LSST Exception handling.
T find_last_of(T... args)
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type and message and optionally other arguments (dependent on the ty...
static StorageRegistry & getRegistry(void)
Return a reference to a subclass registry.
FormatterStorage::Ptr createInstance(std::string const &name)
Create a FormatterStorage subclass instance by name.