Example #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);
     }
 }
Example #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);
     }
 }