Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "[examples/s4u-dht-chord] Handle TimeoutException which may be thrown by Comm...
[simgrid.git] / include / xbt / file.hpp
index d0447d37c042c7bd31b4d54e398e35ecebc5bb10..fd29ff0eb852fa1aca1cf33d26683b98e68c8bf4 100644 (file)
@@ -10,8 +10,7 @@
 #include <vector>
 #include <xbt/base.h>
 
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
 
 void path_push(std::string const& str);
 void path_pop();
@@ -35,9 +34,12 @@ public:
   /** @brief Returns the file component of a path (reimplementation of POSIX basename) */
   std::string get_base_name() const;
 
+  /** @brief Returns the name of a directory suitable for creating temporary files (e.g. "/tmp") */
+  static Path get_tmpdir();
+
 private:
   std::string path_;
 };
-}}
+} // namespace simgrid::xbt
 
 #endif                          /* XBT_FILE_HPP */