Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ns3: live with the fact that sometimes finished_ becomes true with remains is still >0
[simgrid.git] / src / xbt / xbt_os_file.cpp
index 5a0b64d9ff6c6b5cb0521e743a85ccaf140e8aa9..4316ee43676cf0ab3abadeeab2f41da1689ec6b4 100644 (file)
@@ -1,6 +1,6 @@
 /* xbt_os_file.cpp -- portable interface to file-related functions          */
 
-/* Copyright (c) 2017-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017-2020. 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. */
@@ -17,8 +17,8 @@
 #include <unistd.h>
 #endif
 
+#include <cerrno>
 #include <cstring>
-#include <errno.h>
 #include <libgen.h> /* POSIX dirname */
 
 simgrid::xbt::Path::Path()
@@ -33,14 +33,14 @@ simgrid::xbt::Path::Path()
 #endif
 }
 
-std::string simgrid::xbt::Path::get_dir_name()
+std::string simgrid::xbt::Path::get_dir_name() const
 {
   std::string p(path_);
   const char* res = dirname(&p[0]);
   return std::string(res, strlen(res));
 }
 
-std::string simgrid::xbt::Path::get_base_name()
+std::string simgrid::xbt::Path::get_base_name() const
 {
   std::string p(path_);
   const char* res = basename(&p[0]);