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); } }
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); } }
bool TeaSafe::folderExists(std::string const &path) { StateLock lock(m_stateMutex); return doFolderExists(path); }