[gnote] Remove boost filesystem from files.cpp



commit 0dada2018c32368544b0a7078f521594477a8a76
Author: Aurimas Ä?ernius <aurisc4 gmail com>
Date:   Fri Apr 29 23:42:56 2011 +0300

    Remove boost filesystem from files.cpp
    
    Replace by Glib equivalents.

 src/sharp/files.cpp |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/sharp/files.cpp b/src/sharp/files.cpp
index f1a1e4b..ef03cf6 100644
--- a/src/sharp/files.cpp
+++ b/src/sharp/files.cpp
@@ -1,6 +1,7 @@
 /*
  * gnote
  *
+ * Copyright (C) 2011 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -22,9 +23,9 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include <boost/version.hpp>
-#include <boost/filesystem/operations.hpp>
+#include <glib/gstdio.h>
 #include <glibmm.h>
+#include <giomm/file.h>
 
 #include "files.hpp"
 
@@ -60,18 +61,18 @@ namespace sharp {
 
   void file_delete(const std::string & p)
   {
-    boost::filesystem::remove(p);
+    g_unlink(p.c_str());
   }
 
 
   void file_copy(const std::string & source, const std::string & dest)
   {
-    boost::filesystem::copy_file(source, dest);
+    Gio::File::create_for_path(source)->copy(Gio::File::create_for_path(dest), Gio::FILE_COPY_OVERWRITE);
   }
 
   void file_move(const std::string & from, const std::string & to)
   {
-    boost::filesystem::rename(from, to);
+    g_rename(from.c_str(), to.c_str());
   }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]