Пример #1
0
 void
 TeaSafe::throwIfAlreadyExists(std::string const &path) const
 {
     // throw if already exists
     boost::filesystem::path processedPath(path);
     if (doFileExists(processedPath.string())) {
         throw TeaSafeException(TeaSafeError::AlreadyExists);
     }
     if (doFolderExists(processedPath.string())) {
         throw TeaSafeException(TeaSafeError::AlreadyExists);
     }
 }
Пример #2
0
 void
 CoreFS::throwIfAlreadyExists(std::string const &path) const
 {
     // throw if already exists
     boost::filesystem::path processedPath(path);
     if (doFileExists(processedPath.string())) {
         throw KnoxCryptException(KnoxCryptError::AlreadyExists);
     }
     if (doFolderExists(processedPath.string())) {
         throw KnoxCryptException(KnoxCryptError::AlreadyExists);
     }
 }
Пример #3
0
 bool
 TeaSafe::folderExists(std::string const &path)
 {
     StateLock lock(m_stateMutex);
     return doFolderExists(path);
 }