diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/boost/libs/filesystem/example | |
parent | Initial commit. (diff) | |
download | ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/filesystem/example')
35 files changed, 2580 insertions, 0 deletions
diff --git a/src/boost/libs/filesystem/example/Jamfile.v2 b/src/boost/libs/filesystem/example/Jamfile.v2 new file mode 100644 index 00000000..79722835 --- /dev/null +++ b/src/boost/libs/filesystem/example/Jamfile.v2 @@ -0,0 +1,25 @@ +# Boost Filesystem Library Example Jamfile + +# (C) Copyright Vladimir Prus 2003 + +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +# Library home page: http://www.boost.org/libs/filesystem + +project + : requirements + <library>/boost/filesystem//boost_filesystem + <link>static + ; + +exe tut0 : tut0.cpp ; +exe tut1 : tut1.cpp ; +exe tut2 : tut2.cpp ; +exe tut3 : tut3.cpp ; +exe tut4 : tut4.cpp ; +exe tut5 : tut5.cpp ; +exe path_info : path_info.cpp ; +exe file_status : file_status.cpp ; +exe file_size : file_size.cpp ; +exe directory_symlink_parent_resolution : directory_symlink_parent_resolution.cpp ;
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/directory_symlink_parent_resolution.cpp b/src/boost/libs/filesystem/example/directory_symlink_parent_resolution.cpp new file mode 100644 index 00000000..a204b6e9 --- /dev/null +++ b/src/boost/libs/filesystem/example/directory_symlink_parent_resolution.cpp @@ -0,0 +1,41 @@ +// directory_symlink_parent_resolution.cpp -------------------------------------------// + +// Copyright Beman Dawes 2015 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <boost/filesystem.hpp> +#include <boost/filesystem/string_file.hpp> +#include <boost/detail/lightweight_main.hpp> +#include <iostream> +#include <string> +using std::cout; +using std::endl; +using namespace boost::filesystem; + +int cpp_main(int argc, char* argv[]) +{ +# ifdef BOOST_WINDOWS_API + cout << "BOOST_WINDOWS_API" << endl; +# else + cout << "BOOST_POSIX_API" << endl; +# endif + + path test_dir(current_path() / "dspr_demo"); + + remove_all(test_dir); + create_directories(test_dir / "a/c/d"); + current_path(test_dir / "a"); + create_directory_symlink("c/d", "b"); + save_string_file("name.txt", "Windows"); + save_string_file("c/name.txt", "POSIX"); + current_path(test_dir); + std::string s; + load_string_file("a/b/../name.txt", s); + cout << s << endl; + + return 0; +} diff --git a/src/boost/libs/filesystem/example/error_demo.cpp b/src/boost/libs/filesystem/example/error_demo.cpp new file mode 100644 index 00000000..ce16b3bc --- /dev/null +++ b/src/boost/libs/filesystem/example/error_demo.cpp @@ -0,0 +1,185 @@ +// error_demo.cpp --------------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +//--------------------------------------------------------------------------------------// +// // +// The purpose of this program is to demonstrate how error reporting works. // +// // +//--------------------------------------------------------------------------------------// + +#include <boost/filesystem.hpp> +#include <boost/system/system_error.hpp> +#include <iostream> + +using std::cout; +using boost::filesystem::path; +using boost::filesystem::filesystem_error; +using boost::system::error_code; +using boost::system::system_error; +namespace fs = boost::filesystem; + +namespace +{ + void report_system_error(const system_error& ex) + { + cout << " threw system_error:\n" + << " ex.code().value() is " << ex.code().value() << '\n' + << " ex.code().category().name() is " << ex.code().category().name() << '\n' + << " ex.what() is " << ex.what() << '\n' + ; + } + + void report_filesystem_error(const system_error& ex) + { + cout << " threw filesystem_error exception:\n" + << " ex.code().value() is " << ex.code().value() << '\n' + << " ex.code().category().name() is " << ex.code().category().name() << '\n' + << " ex.what() is " << ex.what() << '\n' + ; + } + + void report_status(fs::file_status s) + { + cout << " file_status::type() is "; + switch (s.type()) + { + case fs::status_error: + cout << "status_error\n"; break; + case fs::file_not_found: + cout << "file_not_found\n"; break; + case fs::regular_file: + cout << "regular_file\n"; break; + case fs::directory_file: + cout << "directory_file\n"; break; + case fs::symlink_file: + cout << "symlink_file\n"; break; + case fs::block_file: + cout << "block_file\n"; break; + case fs::character_file: + cout << "character_file\n"; break; + case fs::fifo_file: + cout << "fifo_file\n"; break; + case fs::socket_file: + cout << "socket_file\n"; break; + case fs::type_unknown: + cout << "type_unknown\n"; break; + default: + cout << "not a valid enumeration constant\n"; + } + } + + void report_error_code(const error_code& ec) + { + cout << " ec:\n" + << " value() is " << ec.value() << '\n' + << " category().name() is " << ec.category().name() << '\n' + << " message() is " << ec.message() << '\n' + ; + } + + bool threw_exception; + +} + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: error_demo path\n"; + return 1; + } + + error_code ec; + + //// construct path - no error_code + + //try { path p1(argv[1]); } + //catch (const system_error& ex) + //{ + // cout << "construct path without error_code"; + // report_system_error(ex); + //} + + //// construct path - with error_code + + path p (argv[1]); + + fs::file_status s; + bool b (false); + fs::directory_iterator di; + + // get status - no error_code + + cout << "\nstatus(\"" << p.string() << "\");\n"; + threw_exception = false; + + try { s = fs::status(p); } + catch (const system_error& ex) + { + report_filesystem_error(ex); + threw_exception = true; + } + if (!threw_exception) + cout << " Did not throw exception\n"; + report_status(s); + + // get status - with error_code + + cout << "\nstatus(\"" << p.string() << "\", ec);\n"; + s = fs::status(p, ec); + report_status(s); + report_error_code(ec); + + // query existence - no error_code + + cout << "\nexists(\"" << p.string() << "\");\n"; + threw_exception = false; + + try { b = fs::exists(p); } + catch (const system_error& ex) + { + report_filesystem_error(ex); + threw_exception = true; + } + if (!threw_exception) + { + cout << " Did not throw exception\n" + << " Returns: " << (b ? "true" : "false") << '\n'; + } + + // query existence - with error_code + + // directory_iterator - no error_code + + cout << "\ndirectory_iterator(\"" << p.string() << "\");\n"; + threw_exception = false; + + try { di = fs::directory_iterator(p); } + catch (const system_error& ex) + { + report_filesystem_error(ex); + threw_exception = true; + } + if (!threw_exception) + { + cout << " Did not throw exception\n" + << (di == fs::directory_iterator() ? " Equal" : " Not equal") + << " to the end iterator\n"; + } + + // directory_iterator - with error_code + + cout << "\ndirectory_iterator(\"" << p.string() << "\", ec);\n"; + di = fs::directory_iterator(p, ec); + cout << (di == fs::directory_iterator() ? " Equal" : " Not equal") + << " to the end iterator\n"; + report_error_code(ec); + + return 0; +} diff --git a/src/boost/libs/filesystem/example/file_size.cpp b/src/boost/libs/filesystem/example/file_size.cpp new file mode 100644 index 00000000..3fbfa4ea --- /dev/null +++ b/src/boost/libs/filesystem/example/file_size.cpp @@ -0,0 +1,44 @@ +// file_size program -------------------------------------------------------// + +// Copyright Beman Dawes, 2004 + +// Use, modification, and distribution is subject to 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) + +// See http://www.boost.org/libs/filesystem for documentation. + +#include <boost/filesystem/operations.hpp> +#include <iostream> + +namespace fs = boost::filesystem; + +int main( int argc, char* argv[] ) +{ + + if ( argc != 2 ) + { + std::cout << "Usage: file_size path\n"; + return 1; + } + + std::cout << "sizeof(intmax_t) is " << sizeof(boost::intmax_t) << '\n'; + + fs::path p( argv[1] ); + + if ( !fs::exists( p ) ) + { + std::cout << "not found: " << argv[1] << std::endl; + return 1; + } + + if ( !fs::is_regular( p ) ) + { + std::cout << "not a regular file: " << argv[1] << std::endl; + return 1; + } + + std::cout << "size of " << argv[1] << " is " << fs::file_size( p ) + << std::endl; + return 0; +} diff --git a/src/boost/libs/filesystem/example/file_status.cpp b/src/boost/libs/filesystem/example/file_status.cpp new file mode 100644 index 00000000..5d3774fd --- /dev/null +++ b/src/boost/libs/filesystem/example/file_status.cpp @@ -0,0 +1,117 @@ +// status.cpp ------------------------------------------------------------------------// + +// Copyright Beman Dawes 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <boost/config.hpp> +#include <boost/version.hpp> +#include <boost/filesystem.hpp> +#include <boost/detail/lightweight_main.hpp> + +using std::cout; using std::endl; +using namespace boost::filesystem; + +namespace +{ + path p; + + void print_boost_macros() + { + std::cout << "Boost " + << BOOST_VERSION / 100000 << '.' + << BOOST_VERSION / 100 % 1000 << '.' + << BOOST_VERSION % 100 << ", " +# ifndef _WIN64 + << BOOST_COMPILER << ", " +# else + << BOOST_COMPILER << " with _WIN64 defined, " +# endif + << BOOST_STDLIB << ", " + << BOOST_PLATFORM + << std::endl; + } + + const char* file_type_tab[] = + { "status_error", "file_not_found", "regular_file", "directory_file", + "symlink_file", "block_file", "character_file", "fifo_file", "socket_file", + "type_unknown" + }; + + const char* file_type_c_str(enum file_type t) + { + return file_type_tab[t]; + } + + void show_status(file_status s, boost::system::error_code ec) + { + boost::system::error_condition econd; + + if (ec) + { + econd = ec.default_error_condition(); + cout << "sets ec to indicate an error:\n" + << " ec.value() is " << ec.value() << '\n' + << " ec.message() is \"" << ec.message() << "\"\n" + << " ec.default_error_condition().value() is " << econd.value() << '\n' + << " ec.default_error_condition().message() is \"" << econd.message() << "\"\n"; + } + else + cout << "clears ec.\n"; + + cout << "s.type() is " << s.type() + << ", which is defined as \"" << file_type_c_str(s.type()) << "\"\n"; + + cout << "exists(s) is " << (exists(s) ? "true" : "false") << "\n"; + cout << "status_known(s) is " << (status_known(s) ? "true" : "false") << "\n"; + cout << "is_regular_file(s) is " << (is_regular_file(s) ? "true" : "false") << "\n"; + cout << "is_directory(s) is " << (is_directory(s) ? "true" : "false") << "\n"; + cout << "is_other(s) is " << (is_other(s) ? "true" : "false") << "\n"; + cout << "is_symlink(s) is " << (is_symlink(s) ? "true" : "false") << "\n"; + } + + void try_exists() + { + cout << "\nexists(" << p << ") "; + try + { + bool result = exists(p); + cout << "is " << (result ? "true" : "false") << "\n"; + } + catch (const filesystem_error& ex) + { + cout << "throws a filesystem_error exception: " << ex.what() << "\n"; + } + } + +} + +int cpp_main(int argc, char* argv[]) +{ + print_boost_macros(); + + if (argc < 2) + { + std::cout << "Usage: file_status <path>\n"; + p = argv[0]; + } + else + p = argv[1]; + + boost::system::error_code ec; + file_status s = status(p, ec); + cout << "\nfile_status s = status(" << p << ", ec) "; + show_status(s, ec); + + s = symlink_status(p, ec); + cout << "\nfile_status s = symlink_status(" << p << ", ec) "; + show_status(s, ec); + + try_exists(); + + return 0; +} diff --git a/src/boost/libs/filesystem/example/mbcopy.cpp b/src/boost/libs/filesystem/example/mbcopy.cpp new file mode 100644 index 00000000..2b1f6038 --- /dev/null +++ b/src/boost/libs/filesystem/example/mbcopy.cpp @@ -0,0 +1,90 @@ +// Boost.Filesystem mbcopy.cpp ---------------------------------------------// + +// Copyright Beman Dawes 2005 + +// Use, modification, and distribution is subject to 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) + +// Copy the files in a directory, using mbpath to represent the new file names +// See http://../doc/path.htm#mbpath for more information + +// See deprecated_test for tests of deprecated features +#define BOOST_FILESYSTEM_NO_DEPRECATED + +#include <boost/filesystem/config.hpp> +# ifdef BOOST_FILESYSTEM_NARROW_ONLY +# error This compiler or standard library does not support wide-character strings or paths +# endif + +#include "mbpath.hpp" +#include <iostream> +#include <boost/filesystem/operations.hpp> +#include <boost/filesystem/fstream.hpp> +#include "../src/utf8_codecvt_facet.hpp" + +namespace fs = boost::filesystem; + +namespace +{ + // we can't use boost::filesystem::copy_file() because the argument types + // differ, so provide a not-very-smart replacement. + + void copy_file( const fs::wpath & from, const user::mbpath & to ) + { + fs::ifstream from_file( from, std::ios_base::in | std::ios_base::binary ); + if ( !from_file ) { std::cout << "input open failed\n"; return; } + + fs::ofstream to_file( to, std::ios_base::out | std::ios_base::binary ); + if ( !to_file ) { std::cout << "output open failed\n"; return; } + + char c; + while ( from_file.get(c) ) + { + to_file.put(c); + if ( to_file.fail() ) { std::cout << "write error\n"; return; } + } + + if ( !from_file.eof() ) { std::cout << "read error\n"; } + } +} + +int main( int argc, char * argv[] ) +{ + if ( argc != 2 ) + { + std::cout << "Copy files in the current directory to a target directory\n" + << "Usage: mbcopy <target-dir>\n"; + return 1; + } + + // For encoding, use Boost UTF-8 codecvt + std::locale global_loc = std::locale(); + std::locale loc( global_loc, new fs::detail::utf8_codecvt_facet ); + user::mbpath_traits::imbue( loc ); + + std::string target_string( argv[1] ); + user::mbpath target_dir( user::mbpath_traits::to_internal( target_string ) ); + + if ( !fs::is_directory( target_dir ) ) + { + std::cout << "Error: " << argv[1] << " is not a directory\n"; + return 1; + } + + for ( fs::wdirectory_iterator it( L"." ); + it != fs::wdirectory_iterator(); ++it ) + { + if ( fs::is_regular_file(it->status()) ) + { + copy_file( *it, target_dir / it->path().filename() ); + } + } + + return 0; +} + + + + + diff --git a/src/boost/libs/filesystem/example/mbpath.cpp b/src/boost/libs/filesystem/example/mbpath.cpp new file mode 100644 index 00000000..43590010 --- /dev/null +++ b/src/boost/libs/filesystem/example/mbpath.cpp @@ -0,0 +1,80 @@ +// Boost.Filesystem mbpath.cpp ---------------------------------------------// + +// (c) Copyright Beman Dawes 2005 + +// Use, modification, and distribution is subject to 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) + +// See Boost.Filesystem home page at http://www.boost.org/libs/filesystem + +#include <boost/filesystem/config.hpp> +# ifdef BOOST_FILESYSTEM_NARROW_ONLY +# error This compiler or standard library does not support wide-character strings or paths +# endif + +#include "mbpath.hpp" +#include <boost/system/system_error.hpp> +#include <boost/scoped_array.hpp> + +namespace fs = boost::filesystem; + +namespace +{ + // ISO C calls this "the locale-specific native environment": + std::locale loc(""); + + const std::codecvt<wchar_t, char, std::mbstate_t> * + cvt( &std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t> > + ( loc ) ); +} + +namespace user +{ + mbpath_traits::external_string_type + mbpath_traits::to_external( const mbpath & ph, + const internal_string_type & src ) + { + std::size_t work_size( cvt->max_length() * (src.size()+1) ); + boost::scoped_array<char> work( new char[ work_size ] ); + std::mbstate_t state; + const internal_string_type::value_type * from_next; + external_string_type::value_type * to_next; + if ( cvt->out( + state, src.c_str(), src.c_str()+src.size(), from_next, work.get(), + work.get()+work_size, to_next ) != std::codecvt_base::ok ) + boost::throw_exception<fs::basic_filesystem_error<mbpath> >( + fs::basic_filesystem_error<mbpath>( + "user::mbpath::to_external conversion error", + ph, boost::system::error_code( EINVAL, boost::system::errno_ecat ) ) ); + *to_next = '\0'; + return external_string_type( work.get() ); + } + + mbpath_traits::internal_string_type + mbpath_traits::to_internal( const external_string_type & src ) + { + std::size_t work_size( src.size()+1 ); + boost::scoped_array<wchar_t> work( new wchar_t[ work_size ] ); + std::mbstate_t state; + const external_string_type::value_type * from_next; + internal_string_type::value_type * to_next; + if ( cvt->in( + state, src.c_str(), src.c_str()+src.size(), from_next, work.get(), + work.get()+work_size, to_next ) != std::codecvt_base::ok ) + boost::throw_exception<fs::basic_filesystem_error<mbpath> >( + fs::basic_filesystem_error<mbpath>( + "user::mbpath::to_internal conversion error", + boost::system::error_code( EINVAL, boost::system::errno_ecat ) ) ); + *to_next = L'\0'; + return internal_string_type( work.get() ); + } + + void mbpath_traits::imbue( const std::locale & new_loc ) + { + loc = new_loc; + cvt = &std::use_facet + <std::codecvt<wchar_t, char, std::mbstate_t> >( loc ); + } + +} // namespace user diff --git a/src/boost/libs/filesystem/example/mbpath.hpp b/src/boost/libs/filesystem/example/mbpath.hpp new file mode 100644 index 00000000..f752b3fd --- /dev/null +++ b/src/boost/libs/filesystem/example/mbpath.hpp @@ -0,0 +1,44 @@ +// Boost.Filesystem mbpath.hpp ---------------------------------------------// + +// Copyright Beman Dawes 2005 + +// Use, modification, and distribution is subject to 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) + +// Encodes wide character paths as MBCS +// See http://../doc/path.htm#mbpath for more information + +#include <boost/filesystem/path.hpp> +#include <cwchar> // for std::mbstate_t +#include <string> +#include <locale> + +namespace user +{ + struct mbpath_traits; + + typedef boost::filesystem::basic_path<std::wstring, mbpath_traits> mbpath; + + struct mbpath_traits + { + typedef std::wstring internal_string_type; + typedef std::string external_string_type; + + static external_string_type to_external( const mbpath & ph, + const internal_string_type & src ); + + static internal_string_type to_internal( const external_string_type & src ); + + static void imbue( const std::locale & loc ); + }; +} // namespace user + +namespace boost +{ + namespace filesystem + { + template<> struct is_basic_path<user::mbpath> + { static const bool value = true; }; + } +} diff --git a/src/boost/libs/filesystem/example/msvc/common.props b/src/boost/libs/filesystem/example/msvc/common.props new file mode 100644 index 00000000..527c3c8a --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/common.props @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ImportGroup Label="PropertySheets" /> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup /> + <ItemDefinitionGroup> + <ClCompile> + <AdditionalIncludeDirectories>..\..\..\..\..</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>..\..\..\..\..\stage\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + </ItemDefinitionGroup> + <ItemGroup /> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/msvc/directory_symlink_parent_resolution/directory_symlink_parent_resolution.vcxproj b/src/boost/libs/filesystem/example/msvc/directory_symlink_parent_resolution/directory_symlink_parent_resolution.vcxproj new file mode 100644 index 00000000..243e4d68 --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/directory_symlink_parent_resolution/directory_symlink_parent_resolution.vcxproj @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\directory_symlink_parent_resolution.cpp" /> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{489B5052-4C97-4551-B8C5-1C0C3BD040E8}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>directory_symlink_parent_resolution</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/msvc/filesystem-tutorials.sln b/src/boost/libs/filesystem/example/msvc/filesystem-tutorials.sln new file mode 100644 index 00000000..e41ee55a --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/filesystem-tutorials.sln @@ -0,0 +1,88 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut1", "tut1\tut1.vcxproj", "{04A56B6F-9901-4F6D-8936-9554A44E0DD6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut2", "tut2\tut2.vcxproj", "{BA9220FA-FECF-4B28-80A0-7F5017524EB5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut3", "tut3\tut3.vcxproj", "{747CF49E-27D8-4C5E-BB46-25779FD8DDEB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut4", "tut4\tut4.vcxproj", "{50FB30B4-F088-44E3-81BB-0C9CA65693CB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut5", "tut5\tut5.vcxproj", "{F17107D6-32E8-40EA-89A2-83BA9BA44A56}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_info", "path_info\path_info.vcxproj", "{A37B7F28-3261-41BF-8BC1-8384BD4C8E47}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "directory_symlink_parent_resolution", "directory_symlink_parent_resolution\directory_symlink_parent_resolution.vcxproj", "{489B5052-4C97-4551-B8C5-1C0C3BD040E8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Debug|x64.ActiveCfg = Debug|x64 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Debug|x64.Build.0 = Debug|x64 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Debug|x86.ActiveCfg = Debug|Win32 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Debug|x86.Build.0 = Debug|Win32 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Release|x64.ActiveCfg = Release|x64 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Release|x64.Build.0 = Release|x64 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Release|x86.ActiveCfg = Release|Win32 + {04A56B6F-9901-4F6D-8936-9554A44E0DD6}.Release|x86.Build.0 = Release|Win32 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Debug|x64.ActiveCfg = Debug|x64 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Debug|x64.Build.0 = Debug|x64 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Debug|x86.ActiveCfg = Debug|Win32 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Debug|x86.Build.0 = Debug|Win32 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Release|x64.ActiveCfg = Release|x64 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Release|x64.Build.0 = Release|x64 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Release|x86.ActiveCfg = Release|Win32 + {BA9220FA-FECF-4B28-80A0-7F5017524EB5}.Release|x86.Build.0 = Release|Win32 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Debug|x64.ActiveCfg = Debug|x64 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Debug|x64.Build.0 = Debug|x64 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Debug|x86.ActiveCfg = Debug|Win32 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Debug|x86.Build.0 = Debug|Win32 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Release|x64.ActiveCfg = Release|x64 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Release|x64.Build.0 = Release|x64 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Release|x86.ActiveCfg = Release|Win32 + {747CF49E-27D8-4C5E-BB46-25779FD8DDEB}.Release|x86.Build.0 = Release|Win32 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Debug|x64.ActiveCfg = Debug|x64 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Debug|x64.Build.0 = Debug|x64 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Debug|x86.ActiveCfg = Debug|Win32 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Debug|x86.Build.0 = Debug|Win32 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Release|x64.ActiveCfg = Release|x64 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Release|x64.Build.0 = Release|x64 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Release|x86.ActiveCfg = Release|Win32 + {50FB30B4-F088-44E3-81BB-0C9CA65693CB}.Release|x86.Build.0 = Release|Win32 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Debug|x64.ActiveCfg = Debug|x64 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Debug|x64.Build.0 = Debug|x64 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Debug|x86.ActiveCfg = Debug|Win32 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Debug|x86.Build.0 = Debug|Win32 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Release|x64.ActiveCfg = Release|x64 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Release|x64.Build.0 = Release|x64 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Release|x86.ActiveCfg = Release|Win32 + {F17107D6-32E8-40EA-89A2-83BA9BA44A56}.Release|x86.Build.0 = Release|Win32 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Debug|x64.ActiveCfg = Debug|x64 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Debug|x64.Build.0 = Debug|x64 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Debug|x86.ActiveCfg = Debug|Win32 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Debug|x86.Build.0 = Debug|Win32 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Release|x64.ActiveCfg = Release|x64 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Release|x64.Build.0 = Release|x64 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Release|x86.ActiveCfg = Release|Win32 + {A37B7F28-3261-41BF-8BC1-8384BD4C8E47}.Release|x86.Build.0 = Release|Win32 + {489B5052-4C97-4551-B8C5-1C0C3BD040E8}.Debug|x64.ActiveCfg = Debug|x64 + {489B5052-4C97-4551-B8C5-1C0C3BD040E8}.Debug|x64.Build.0 = Debug|x64 + {489B5052-4C97-4551-B8C5-1C0C3BD040E8}.Debug|x86.ActiveCfg = Debug|Win32 + {489B5052-4C97-4551-B8C5-1C0C3BD040E8}.Debug|x86.Build.0 = Debug|Win32 + {489B5052-4C97-4551-B8C5-1C0C3BD040E8}.Release|x64.ActiveCfg = Release|x64 + {489B5052-4C97-4551-B8C5-1C0C3BD040E8}.Release|x64.Build.0 = Release|x64 + {489B5052-4C97-4551-B8C5-1C0C3BD040E8}.Release|x86.ActiveCfg = Release|Win32 + {489B5052-4C97-4551-B8C5-1C0C3BD040E8}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/boost/libs/filesystem/example/msvc/path_info/path_info.vcxproj b/src/boost/libs/filesystem/example/msvc/path_info/path_info.vcxproj new file mode 100644 index 00000000..64fe4ea9 --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/path_info/path_info.vcxproj @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{A37B7F28-3261-41BF-8BC1-8384BD4C8E47}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>path_info</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\path_info.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/msvc/tut1/tut1.vcxproj b/src/boost/libs/filesystem/example/msvc/tut1/tut1.vcxproj new file mode 100644 index 00000000..7178454c --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/tut1/tut1.vcxproj @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{04A56B6F-9901-4F6D-8936-9554A44E0DD6}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>tut1</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\tut1.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/msvc/tut2/tut2.vcxproj b/src/boost/libs/filesystem/example/msvc/tut2/tut2.vcxproj new file mode 100644 index 00000000..b7ec3fd3 --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/tut2/tut2.vcxproj @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{BA9220FA-FECF-4B28-80A0-7F5017524EB5}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>tut2</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\tut2.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/msvc/tut3/tut3.vcxproj b/src/boost/libs/filesystem/example/msvc/tut3/tut3.vcxproj new file mode 100644 index 00000000..f452e0d1 --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/tut3/tut3.vcxproj @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{747CF49E-27D8-4C5E-BB46-25779FD8DDEB}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>tut3</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe" .</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe" .</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe" .</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe" .</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\tut3.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/msvc/tut4/tut4.vcxproj b/src/boost/libs/filesystem/example/msvc/tut4/tut4.vcxproj new file mode 100644 index 00000000..f080b019 --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/tut4/tut4.vcxproj @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{50FB30B4-F088-44E3-81BB-0C9CA65693CB}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>tut4</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe" .</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe" .</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe" .</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + <PostBuildEvent> + <Command>"$(TargetDir)\$(TargetName).exe" .</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\tut4.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/msvc/tut5/tut5.vcxproj b/src/boost/libs/filesystem/example/msvc/tut5/tut5.vcxproj new file mode 100644 index 00000000..ca6fe086 --- /dev/null +++ b/src/boost/libs/filesystem/example/msvc/tut5/tut5.vcxproj @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{F17107D6-32E8-40EA-89A2-83BA9BA44A56}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>tut5</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v140</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\common.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\..\tut5.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/filesystem/example/path_info.cpp b/src/boost/libs/filesystem/example/path_info.cpp new file mode 100644 index 00000000..42e4bdfb --- /dev/null +++ b/src/boost/libs/filesystem/example/path_info.cpp @@ -0,0 +1,82 @@ +// path_info.cpp ---------------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <boost/filesystem.hpp> +using namespace std; +using namespace boost::filesystem; + +const char * say_what(bool b) { return b ? "true" : "false"; } + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: path_info path-element [path-element...]\n" + "Composes a path via operator/= from one or more path-element arguments\n" + "Example: path_info foo/bar baz\n" +# ifdef BOOST_POSIX_API + " would report info about the composed path foo/bar/baz\n"; +# else // BOOST_WINDOWS_API + " would report info about the composed path foo/bar\\baz\n"; +# endif + return 1; + } + + path p; + for (; argc > 1; --argc, ++argv) + p /= argv[1]; // compose path p from the command line arguments + + cout << "\ncomposed path:\n"; + cout << " operator<<()---------: " << p << "\n"; + cout << " make_preferred()-----: " << p.make_preferred() << "\n"; + + cout << "\nelements:\n"; + for (auto element : p) + cout << " " << element << '\n'; + + cout << "\nobservers, native format:" << endl; +# ifdef BOOST_POSIX_API + cout << " native()-------------: " << p.native() << endl; + cout << " c_str()--------------: " << p.c_str() << endl; +# else // BOOST_WINDOWS_API + wcout << L" native()-------------: " << p.native() << endl; + wcout << L" c_str()--------------: " << p.c_str() << endl; +# endif + cout << " string()-------------: " << p.string() << endl; + wcout << L" wstring()------------: " << p.wstring() << endl; + + cout << "\nobservers, generic format:\n"; + cout << " generic_string()-----: " << p.generic_string() << endl; + wcout << L" generic_wstring()----: " << p.generic_wstring() << endl; + + cout << "\ndecomposition:\n"; + cout << " root_name()----------: " << p.root_name() << '\n'; + cout << " root_directory()-----: " << p.root_directory() << '\n'; + cout << " root_path()----------: " << p.root_path() << '\n'; + cout << " relative_path()------: " << p.relative_path() << '\n'; + cout << " parent_path()--------: " << p.parent_path() << '\n'; + cout << " filename()-----------: " << p.filename() << '\n'; + cout << " stem()---------------: " << p.stem() << '\n'; + cout << " extension()----------: " << p.extension() << '\n'; + + cout << "\nquery:\n"; + cout << " empty()--------------: " << say_what(p.empty()) << '\n'; + cout << " is_absolute()--------: " << say_what(p.is_absolute()) << '\n'; + cout << " has_root_name()------: " << say_what(p.has_root_name()) << '\n'; + cout << " has_root_directory()-: " << say_what(p.has_root_directory()) << '\n'; + cout << " has_root_path()------: " << say_what(p.has_root_path()) << '\n'; + cout << " has_relative_path()--: " << say_what(p.has_relative_path()) << '\n'; + cout << " has_parent_path()----: " << say_what(p.has_parent_path()) << '\n'; + cout << " has_filename()-------: " << say_what(p.has_filename()) << '\n'; + cout << " has_stem()-----------: " << say_what(p.has_stem()) << '\n'; + cout << " has_extension()------: " << say_what(p.has_extension()) << '\n'; + + return 0; +} diff --git a/src/boost/libs/filesystem/example/simple_ls.cpp b/src/boost/libs/filesystem/example/simple_ls.cpp new file mode 100644 index 00000000..c914a51e --- /dev/null +++ b/src/boost/libs/filesystem/example/simple_ls.cpp @@ -0,0 +1,92 @@ +// simple_ls program -------------------------------------------------------// + +// Copyright Jeff Garland and Beman Dawes, 2002 + +// Use, modification, and distribution is subject to 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) + +// See http://www.boost.org/libs/filesystem for documentation. + +#define BOOST_FILESYSTEM_VERSION 3 + +// As an example program, we don't want to use any deprecated features +#ifndef BOOST_FILESYSTEM_NO_DEPRECATED +# define BOOST_FILESYSTEM_NO_DEPRECATED +#endif +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED +#endif + +#include <boost/filesystem/operations.hpp> +#include <boost/filesystem/directory.hpp> +#include <boost/filesystem/path.hpp> +#include <iostream> + +namespace fs = boost::filesystem; + +int main(int argc, char* argv[]) +{ + fs::path p(fs::current_path()); + + if (argc > 1) + p = fs::system_complete(argv[1]); + else + std::cout << "\nusage: simple_ls [path]" << std::endl; + + unsigned long file_count = 0; + unsigned long dir_count = 0; + unsigned long other_count = 0; + unsigned long err_count = 0; + + if (!fs::exists(p)) + { + std::cout << "\nNot found: " << p << std::endl; + return 1; + } + + if (fs::is_directory(p)) + { + std::cout << "\nIn directory: " << p << "\n\n"; + fs::directory_iterator end_iter; + for (fs::directory_iterator dir_itr(p); + dir_itr != end_iter; + ++dir_itr) + { + try + { + if (fs::is_directory(dir_itr->status())) + { + ++dir_count; + std::cout << dir_itr->path().filename() << " [directory]\n"; + } + else if (fs::is_regular_file(dir_itr->status())) + { + ++file_count; + std::cout << dir_itr->path().filename() << "\n"; + } + else + { + ++other_count; + std::cout << dir_itr->path().filename() << " [other]\n"; + } + + } + catch (const std::exception & ex) + { + ++err_count; + std::cout << dir_itr->path().filename() << " " << ex.what() << std::endl; + } + } + std::cout << "\n" << file_count << " files\n" + << dir_count << " directories\n" + << other_count << " others\n" + << err_count << " errors\n"; + } + else // must be a file + { + std::cout << "\nFound: " << p << "\n"; + } + + return 0; +} diff --git a/src/boost/libs/filesystem/example/stems.cpp b/src/boost/libs/filesystem/example/stems.cpp new file mode 100644 index 00000000..3699fa81 --- /dev/null +++ b/src/boost/libs/filesystem/example/stems.cpp @@ -0,0 +1,31 @@ +// filesystem example stems.cpp ------------------------------------------------------// + +// Copyright Beman Dawes 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <boost/filesystem.hpp> +#include <iostream> + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: stems <path>\n"; + return 1; + } + + boost::filesystem::path p(argv[1]), name(p.filename()); + + for(;;) + { + std::cout << "filename " << name << " has stem " << name.stem() + << " and extension " << name.extension() << "\n"; + if (name.stem().empty() || name.extension().empty()) + return 0; + name = name.stem(); + } +} diff --git a/src/boost/libs/filesystem/example/tchar.cpp b/src/boost/libs/filesystem/example/tchar.cpp new file mode 100644 index 00000000..5f33d69e --- /dev/null +++ b/src/boost/libs/filesystem/example/tchar.cpp @@ -0,0 +1,39 @@ +// Example use of Microsoft TCHAR ----------------------------------------------------// + +// Copyright Beman Dawes 2008 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#include <boost/filesystem/path.hpp> +#include <boost/filesystem/operations.hpp> +#include <string> +#include <cassert> +#include <windows.h> +#include <winnt.h> + +namespace fs = boost::filesystem; + +typedef std::basic_string<TCHAR> tstring; + +void func( const fs::path & p ) +{ + assert( fs::exists( p ) ); +} + +int main() +{ + // get a path that is known to exist + fs::path cp = fs::current_path(); + + // demo: get tstring from the path + tstring cp_as_tstring = cp.string<tstring>(); + + // demo: pass tstring to filesystem function taking path + assert( fs::exists( cp_as_tstring ) ); + + // demo: pass tstring to user function taking path + func( cp_as_tstring ); + + return 0; +} diff --git a/src/boost/libs/filesystem/example/test/Jamfile.v2 b/src/boost/libs/filesystem/example/test/Jamfile.v2 new file mode 100644 index 00000000..22a16325 --- /dev/null +++ b/src/boost/libs/filesystem/example/test/Jamfile.v2 @@ -0,0 +1,29 @@ +# Boost Filesystem Library Tutorial Jamfile + +# (C) Copyright Beman Dawes 2010 +# (C) Copyright Vladimir Prus 2003 + +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt + +# Library home page: http://www.boost.org/libs/filesystem + +project + : requirements + <library>/boost/filesystem//boost_filesystem + ; + +exe tut1 : tut1.cpp ; +exe tut2 : tut2.cpp ; +exe tut3 : tut3.cpp ; +exe tut4 : tut4.cpp ; +exe tut5 : tut5.cpp ; +exe path_info : path_info.cpp ; + +install tut1-copy : tut1 : <location>. ; +install tut2-copy : tut2 : <location>. ; +install tut3-copy : tut3 : <location>. ; +install tut4-copy : tut4 : <location>. ; +install tut5-copy : tut5 : <location>. ; +install path_info-copy : path_info : <location>. ; + diff --git a/src/boost/libs/filesystem/example/test/build.bat b/src/boost/libs/filesystem/example/test/build.bat new file mode 100644 index 00000000..1921ca1c --- /dev/null +++ b/src/boost/libs/filesystem/example/test/build.bat @@ -0,0 +1,7 @@ +@echo off +rem Copyright Beman Dawes, 2010 +rem Distributed under the Boost Software License, Version 1.0. +rem See www.boost.org/LICENSE_1_0.txt +echo Compiling example programs... +b2 %* >b2.log +find "error" <b2.log diff --git a/src/boost/libs/filesystem/example/test/build.sh b/src/boost/libs/filesystem/example/test/build.sh new file mode 100755 index 00000000..19b1a788 --- /dev/null +++ b/src/boost/libs/filesystem/example/test/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Copyright Beman Dawes, 2010 +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt +echo Compiling example programs... +b2 $* >b2.log +grep "error" <b2.log diff --git a/src/boost/libs/filesystem/example/test/setup.bat b/src/boost/libs/filesystem/example/test/setup.bat new file mode 100644 index 00000000..59822a51 --- /dev/null +++ b/src/boost/libs/filesystem/example/test/setup.bat @@ -0,0 +1,13 @@ +@echo off +rem Copyright Beman Dawes, 2010 +rem Distributed under the Boost Software License, Version 1.0. +rem See www.boost.org/LICENSE_1_0.txt +echo Copying example programs... +copy /y ..\tut1.cpp >nul +copy /y ..\tut2.cpp >nul +copy /y ..\tut3.cpp >nul +copy /y ..\tut4.cpp >nul +copy /y ..\tut5.cpp >nul +copy /y ..\path_info.cpp >nul +del *.exe 2>nul +del *.pdb 2>nul diff --git a/src/boost/libs/filesystem/example/test/setup.sh b/src/boost/libs/filesystem/example/test/setup.sh new file mode 100755 index 00000000..cb1ba684 --- /dev/null +++ b/src/boost/libs/filesystem/example/test/setup.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Copyright Beman Dawes, 2010 +# Distributed under the Boost Software License, Version 1.0. +# See www.boost.org/LICENSE_1_0.txt +echo Copying example programs... +cp ../tut1.cpp . +cp ../tut2.cpp . +cp ../tut3.cpp . +cp ../tut4.cpp . +cp ../tut5.cpp . +cp ../path_info.cpp . +rm tut1 2>~/junk +rm tut2 2>~/junk +rm tut3 2>~/junk +rm tut4 2>~/junk +rm tut5 2>~/junk +rm path_info 2>~/junk + diff --git a/src/boost/libs/filesystem/example/tut0.cpp b/src/boost/libs/filesystem/example/tut0.cpp new file mode 100644 index 00000000..3e294c02 --- /dev/null +++ b/src/boost/libs/filesystem/example/tut0.cpp @@ -0,0 +1,23 @@ +// filesystem tut0.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <boost/filesystem.hpp> +namespace fs = boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut0 path\n"; + return 1; + } + std::cout << argv[1] << '\n'; + return 0; +} diff --git a/src/boost/libs/filesystem/example/tut1.cpp b/src/boost/libs/filesystem/example/tut1.cpp new file mode 100644 index 00000000..3ac85b90 --- /dev/null +++ b/src/boost/libs/filesystem/example/tut1.cpp @@ -0,0 +1,23 @@ +// filesystem tut1.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <boost/filesystem.hpp> +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut1 path\n"; + return 1; + } + std::cout << argv[1] << " " << file_size(argv[1]) << '\n'; + return 0; +} diff --git a/src/boost/libs/filesystem/example/tut2.cpp b/src/boost/libs/filesystem/example/tut2.cpp new file mode 100644 index 00000000..147dc3d8 --- /dev/null +++ b/src/boost/libs/filesystem/example/tut2.cpp @@ -0,0 +1,40 @@ +// filesystem tut2.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <boost/filesystem.hpp> +using namespace std; +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: tut2 path\n"; + return 1; + } + + path p(argv[1]); // avoid repeated path construction below + + if (exists(p)) // does path p actually exist? + { + if (is_regular_file(p)) // is path p a regular file? + cout << p << " size is " << file_size(p) << '\n'; + + else if (is_directory(p)) // is path p a directory? + cout << p << " is a directory\n"; + + else + cout << p << " exists, but is not a regular file or directory\n"; + } + else + cout << p << " does not exist\n"; + + return 0; +} diff --git a/src/boost/libs/filesystem/example/tut3.cpp b/src/boost/libs/filesystem/example/tut3.cpp new file mode 100644 index 00000000..f930e101 --- /dev/null +++ b/src/boost/libs/filesystem/example/tut3.cpp @@ -0,0 +1,52 @@ +// filesystem tut3.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <boost/filesystem.hpp> +using std::cout; +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: tut3 path\n"; + return 1; + } + + path p (argv[1]); + + try + { + if (exists(p)) + { + if (is_regular_file(p)) + cout << p << " size is " << file_size(p) << '\n'; + + else if (is_directory(p)) + { + cout << p << " is a directory containing:\n"; + + for (const directory_entry& x : directory_iterator(p)) + cout << " " << x.path() << '\n'; + } + else + cout << p << " exists, but is not a regular file or directory\n"; + } + else + cout << p << " does not exist\n"; + } + + catch (const filesystem_error& ex) + { + cout << ex.what() << '\n'; + } + + return 0; +} diff --git a/src/boost/libs/filesystem/example/tut4.cpp b/src/boost/libs/filesystem/example/tut4.cpp new file mode 100644 index 00000000..513a5e62 --- /dev/null +++ b/src/boost/libs/filesystem/example/tut4.cpp @@ -0,0 +1,61 @@ +// filesystem tut4.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <vector> +#include <algorithm> +#include <boost/filesystem.hpp> +using std::cout; +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + cout << "Usage: tut4 path\n"; + return 1; + } + + path p (argv[1]); + + try + { + if (exists(p)) + { + if (is_regular_file(p)) + cout << p << " size is " << file_size(p) << '\n'; + + else if (is_directory(p)) + { + cout << p << " is a directory containing:\n"; + + std::vector<path> v; + + for (auto&& x : directory_iterator(p)) + v.push_back(x.path()); + + std::sort(v.begin(), v.end()); + + for (auto&& x : v) + cout << " " << x.filename() << '\n'; + } + else + cout << p << " exists, but is not a regular file or directory\n"; + } + else + cout << p << " does not exist\n"; + } + + catch (const filesystem_error& ex) + { + cout << ex.what() << '\n'; + } + + return 0; +} diff --git a/src/boost/libs/filesystem/example/tut5.cpp b/src/boost/libs/filesystem/example/tut5.cpp new file mode 100644 index 00000000..d665b0db --- /dev/null +++ b/src/boost/libs/filesystem/example/tut5.cpp @@ -0,0 +1,52 @@ +// filesystem tut5.cpp ---------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <boost/filesystem/fstream.hpp> +#include <string> +#include <list> +namespace fs = boost::filesystem; + +int main() +{ + // \u263A is "Unicode WHITE SMILING FACE = have a nice day!" + std::string narrow_string ("smile2"); + std::wstring wide_string (L"smile2\u263A"); + std::list<char> narrow_list; + narrow_list.push_back('s'); + narrow_list.push_back('m'); + narrow_list.push_back('i'); + narrow_list.push_back('l'); + narrow_list.push_back('e'); + narrow_list.push_back('3'); + std::list<wchar_t> wide_list; + wide_list.push_back(L's'); + wide_list.push_back(L'm'); + wide_list.push_back(L'i'); + wide_list.push_back(L'l'); + wide_list.push_back(L'e'); + wide_list.push_back(L'3'); + wide_list.push_back(L'\u263A'); + + { fs::ofstream f("smile"); } + { fs::ofstream f(L"smile\u263A"); } + { fs::ofstream f(narrow_string); } + { fs::ofstream f(wide_string); } + { fs::ofstream f(narrow_list); } + { fs::ofstream f(wide_list); } + narrow_list.pop_back(); + narrow_list.push_back('4'); + wide_list.pop_back(); + wide_list.pop_back(); + wide_list.push_back(L'4'); + wide_list.push_back(L'\u263A'); + { fs::ofstream f(fs::path(narrow_list.begin(), narrow_list.end())); } + { fs::ofstream f(fs::path(wide_list.begin(), wide_list.end())); } + + return 0; +} diff --git a/src/boost/libs/filesystem/example/tut6a.cpp b/src/boost/libs/filesystem/example/tut6a.cpp new file mode 100644 index 00000000..f579a427 --- /dev/null +++ b/src/boost/libs/filesystem/example/tut6a.cpp @@ -0,0 +1,48 @@ +// filesystem tut6a.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <exception> +#include <boost/filesystem.hpp> +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut6a path\n"; + return 1; + } + + try + { + for (recursive_directory_iterator it (argv[1]); + it != recursive_directory_iterator(); + ++it) + { + if (it.level() > 1) + it.pop(); + else + { + for (int i = 0; i <= it.level(); ++i) + std::cout << " "; + + std::cout << it->path() << '\n'; + } + } + } + + catch (const std::exception& ex) + { + std::cout << "************* exception *****************\n"; + std::cout << ex.what() << '\n'; + } + + return 0; +} diff --git a/src/boost/libs/filesystem/example/tut6b.cpp b/src/boost/libs/filesystem/example/tut6b.cpp new file mode 100644 index 00000000..90f54efc --- /dev/null +++ b/src/boost/libs/filesystem/example/tut6b.cpp @@ -0,0 +1,50 @@ +// filesystem tut6b.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <exception> +#include <boost/filesystem.hpp> +using namespace boost::filesystem; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut6b path\n"; + return 1; + } + + try + { + for (recursive_directory_iterator it (argv[1]); + it != recursive_directory_iterator(); + ) + { + for (int i = 0; i <= it.level(); ++i) + std::cout << " "; + + std::cout << it->path() << '\n'; + + try { ++it; } + catch (const filesystem_error& ex) + { + std::cout << "************* filesystem_error *****************\n"; + std::cout << ex.what() << '\n'; + } + } + } + + catch (const std::exception& ex) + { + std::cout << "************* exception *****************\n"; + std::cout << ex.what() << '\n'; + } + + return 0; +} diff --git a/src/boost/libs/filesystem/example/tut6c.cpp b/src/boost/libs/filesystem/example/tut6c.cpp new file mode 100644 index 00000000..2b73f774 --- /dev/null +++ b/src/boost/libs/filesystem/example/tut6c.cpp @@ -0,0 +1,40 @@ +// filesystem tut6c.cpp --------------------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Library home page: http://www.boost.org/libs/filesystem + +#include <iostream> +#include <exception> +#include <boost/filesystem.hpp> +#include <boost/system/error_code.hpp> + +using namespace boost::filesystem; +using namespace boost::system; + +int main(int argc, char* argv[]) +{ + if (argc < 2) + { + std::cout << "Usage: tut6c path\n"; + return 1; + } + + error_code ec; + for (recursive_directory_iterator it (argv[1], ec); + it != recursive_directory_iterator(); + ) + { + for (int i = 0; i <= it.level(); ++i) + std::cout << " "; + + std::cout << it->path() << '\n'; + + it.increment(ec); + } + + return 0; +} |