diff Core/FileStorage.cpp @ 50:a15e90e5d6fc

rename in code
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Sep 2012 15:50:12 +0200
parents 3959d33612cc
children c996319e90bc
line wrap: on
line diff
--- a/Core/FileStorage.cpp	Wed Sep 05 15:38:08 2012 +0200
+++ b/Core/FileStorage.cpp	Wed Sep 05 15:50:12 2012 +0200
@@ -1,5 +1,5 @@
 /**
- * Palantir - A Lightweight, RESTful DICOM Store
+ * Palanthir - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012 Medical Physics Department, CHU of Liege,
  * Belgium
  *
@@ -23,13 +23,13 @@
 // http://stackoverflow.com/questions/1576272/storing-large-number-of-files-in-file-system
 // http://stackoverflow.com/questions/446358/storing-a-large-number-of-images
 
-#include "PalantirException.h"
+#include "PalanthirException.h"
 #include "Toolbox.h"
 #include "Uuid.h"
 
 #include <boost/filesystem/fstream.hpp>
 
-namespace Palantir
+namespace Palanthir
 {
   boost::filesystem::path FileStorage::GetPath(const std::string& uuid) const
   {
@@ -37,7 +37,7 @@
 
     if (!Toolbox::IsUuid(uuid))
     {
-      throw PalantirException(ErrorCode_ParameterOutOfRange);
+      throw PalanthirException(ErrorCode_ParameterOutOfRange);
     }
 
     fs::path path = root_;
@@ -60,14 +60,14 @@
     {
       if (!fs::is_directory(root))
       {
-        throw PalantirException("The file storage root directory is a file");
+        throw PalanthirException("The file storage root directory is a file");
       }
     }
     else
     {
       if (!fs::create_directories(root))
       {
-        throw PalantirException("Unable to create the file storage root directory");
+        throw PalanthirException("Unable to create the file storage root directory");
       }
     }
   }
@@ -96,14 +96,14 @@
     {
       if (!boost::filesystem::is_directory(path.parent_path()))
       {
-        throw PalantirException("The subdirectory to be created is already occupied by a regular file");        
+        throw PalanthirException("The subdirectory to be created is already occupied by a regular file");        
       }
     }
     else
     {
       if (!boost::filesystem::create_directories(path.parent_path()))
       {
-        throw PalantirException("Unable to create a subdirectory in the file storage");        
+        throw PalanthirException("Unable to create a subdirectory in the file storage");        
       }
     }
 
@@ -111,7 +111,7 @@
     f.open(path, std::ofstream::out | std::ios::binary);
     if (!f.good())
     {
-      throw PalantirException("Unable to create a new file in the file storage");
+      throw PalanthirException("Unable to create a new file in the file storage");
     }
 
     if (size != 0)
@@ -120,7 +120,7 @@
       if (!f.good())
       {
         f.close();
-        throw PalantirException("Unable to write to the new file in the file storage");
+        throw PalanthirException("Unable to write to the new file in the file storage");
       }
     }