From 2806908f63ad91ce1052dab238bfd6602ad5a98c Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Thu, 18 Feb 2016 08:21:50 +0100 Subject: [PATCH] filesystem ext --- include/nana/filesystem/filesystem_ext.hpp | 30 +++++++++++++++++++ .../nana/filesystem/filesystem_selector.hpp | 11 +------ 2 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 include/nana/filesystem/filesystem_ext.hpp diff --git a/include/nana/filesystem/filesystem_ext.hpp b/include/nana/filesystem/filesystem_ext.hpp new file mode 100644 index 00000000..1f5d4317 --- /dev/null +++ b/include/nana/filesystem/filesystem_ext.hpp @@ -0,0 +1,30 @@ +/** +* Nana C++ Library(http://www.nanapro.org) +* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com) +* +* Distributed under the Boost Software License, Version 1.0. +* (See accompanying file LICENSE_1_0.txt or copy at +* http://www.boost.org/LICENSE_1_0.txt) +* +* @file nana\filesystem\filesystem_ext.hpp +* @autor by Ariel Vina-Rodriguez: +* @brief Some convenient extensions to the filesystem library. +* +*/ + +#ifndef NANA_FILESYSTEM_EXT_HPP +#define NANA_FILESYSTEM_EXT_HPP + +#if defined(NANA_WINDOWS) + constexpr auto def_root = "C:"; + constexpr auto def_rootstr = "C:\\"; + constexpr auto def_rootname = "Local Drive(C:)"; +#elif defined(NANA_LINUX) + constexpr auto def_root = "/"; + constexpr auto def_rootstr = "/"; + constexpr auto def_rootname = "Root/"; +#endif + +// nana::experimental::filesystem::path_user()); // REPLACE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! to filesystem_ext.hhp + +#endif //NANA_FILESYSTEM_EXT_HPP diff --git a/include/nana/filesystem/filesystem_selector.hpp b/include/nana/filesystem/filesystem_selector.hpp index 6b26b5d5..a91e903d 100644 --- a/include/nana/filesystem/filesystem_selector.hpp +++ b/include/nana/filesystem/filesystem_selector.hpp @@ -63,17 +63,8 @@ # define __cpp_lib_experimental_filesystem 1 #endif -#if defined(NANA_WINDOWS) -constexpr auto def_root = "C:"; -constexpr auto def_rootstr = "C:\\"; -constexpr auto def_rootname = "Local Drive(C:)"; -#elif defined(NANA_LINUX) -constexpr auto def_root = "/"; -constexpr auto def_rootstr = "/"; -constexpr auto def_rootname = "Root/"; -#endif -#endif // NANA_FILESYSTEM_SELECTOR // "Force use of Boost filesystem if available (over ISO)? +#endif // NANA_FILESYSTEM_SELECTOR