Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge C++ API into simgrid/plugins/file_system.h to make it public
[simgrid.git] / examples / s4u / io-file-system / s4u-io-file-system.cpp
index 269cab9..832d267 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -6,8 +6,8 @@
 #include <string>
 #include <unordered_map>
 
+#include "simgrid/plugins/file_system.h"
 #include "simgrid/s4u.hpp"
-#include "src/plugins/file_system/FileSystem.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "a sample log category");
 
@@ -84,6 +84,7 @@ public:
     file = new simgrid::s4u::File("/home/tmp/simgrid.readme", nullptr);
     XBT_INFO("Unlink file: '%s'", file->getPath());
     file->unlink();
+    delete file; // Unlinking the file on "disk" does not free the object
 
     show_info(mounts);
   }