XBT
- Define class simgrid::xbt::Path to manage file names.
- Removed unused functions:
- - xbt/file.h: xbt_dirname(), xbt_getline()
+ - xbt/file.h: xbt_basename(), xbt_dirname(), xbt_getline()
SimGrid (3.17) Released October 8 2017
/* xbt.h - Public interface to the xbt (SimGrid's toolbox) */
-/* Copyright (c) 2004-2014. The SimGrid Team.
+/* Copyright (c) 2004-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <xbt/misc.h>
#include <xbt/sysdep.h>
#include <xbt/str.h>
-#include <xbt/file.h>
#include <xbt/function_types.h>
#include <xbt/asserts.h>
+++ /dev/null
-/* Copyright (c) 2007-2017. 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. */
-
-#ifndef XBT_FILE_H
-#define XBT_FILE_H
-
-#include <xbt/base.h>
-
-SG_BEGIN_DECL()
-
-/** @defgroup XBT_file File manipulation functions
- * @ingroup XBT_misc
- *
- * This module redefine some quite classical functions such as xbt_basename() for the platforms lacking them.
- * @{
- */
-/* Our own implementation of basename, that does not exist on windows */
-XBT_PUBLIC(char *) xbt_basename(const char *path);
-
-/**@}*/
-
-SG_END_DECL()
-#endif /* XBT_FILE_H */
#include "graph_private.h"
#include "xbt/dict.h"
#include "xbt/heap.h"
-#include "xbt/file.h"
#include <errno.h>
#include <stdio.h>
#include <xbt/sysdep.h>
#include <xbt/base.h>
-#include <xbt/file.h>
#include <xbt/log.h>
#include "memory_map.hpp"
#include "xbt/file.hpp" /* this module */
-#include "xbt/file.h"
-#include "xbt/sysdep.h"
-
#ifdef _WIN32
#include <windows.h>
#endif
#include <cstring>
#include <libgen.h> /* POSIX dirname */
-/** @brief Returns the file component of a path (reimplementation of POSIX basename)
- *
- * The argument is never modified, and the returned value must be freed after use.
- */
-char *xbt_basename(const char *path)
-{
- return xbt_strdup(simgrid::xbt::Path(path).getBasename().c_str());
-}
-
std::string simgrid::xbt::Path::getDirname()
{
std::string p(path_);
include/xbt/ex.hpp
include/xbt/exception.hpp
include/xbt/Extendable.hpp
- include/xbt/file.h
include/xbt/file.hpp
include/xbt/functional.hpp
include/xbt/function_types.h