19 |
20 | #undef BOOST_UTF8_BEGIN_NAMESPACE
21 | #undef BOOST_UTF8_END_NAMESPACE
22 | #undef BOOST_UTF8_DECL
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/include/boost/filesystem/exception.hpp:
--------------------------------------------------------------------------------
1 | // boost/filesystem/exception.hpp -----------------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2003
4 | // Use, modification, and distribution is subject to the Boost Software
5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 | // http://www.boost.org/LICENSE_1_0.txt)
7 |
8 | // This header is no longer used. The contents have been moved to path.hpp.
9 | // It is provided so that user code #includes do not have to be changed.
10 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Automatic redirection failed, please go to
7 | doc/index.htm.
8 |
9 | © Copyright Beman Dawes, 2003
10 | Distributed under the Boost Software License, Version 1.0.
11 | See http://www.boost.org/LICENSE_1_0.txt
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/codecvt_error_category.cpp:
--------------------------------------------------------------------------------
1 | // codecvt_error_category implementation file ----------------------------------------//
2 |
3 | // Copyright Beman Dawes 2009
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt)
7 |
8 | // Library home page at http://www.boost.org/libs/filesystem
9 |
10 | //--------------------------------------------------------------------------------------//
11 |
12 | #include
13 |
14 | // define BOOST_FILESYSTEM_SOURCE so that knows
15 | // the library is being built (possibly exporting rather than importing code)
16 | #define BOOST_FILESYSTEM_SOURCE
17 |
18 | #ifndef BOOST_SYSTEM_NO_DEPRECATED
19 | # define BOOST_SYSTEM_NO_DEPRECATED
20 | #endif
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | //--------------------------------------------------------------------------------------//
31 |
32 | namespace
33 | {
34 | class codecvt_error_cat : public boost::system::error_category
35 | {
36 | public:
37 | codecvt_error_cat(){}
38 | const char* name() const;
39 | std::string message(int ev) const;
40 | };
41 |
42 | const char* codecvt_error_cat::name() const
43 | {
44 | return "codecvt";
45 | }
46 |
47 | std::string codecvt_error_cat::message(int ev) const
48 | {
49 | std::string str;
50 | switch (ev)
51 | {
52 | case std::codecvt_base::ok:
53 | str = "ok";
54 | break;
55 | case std::codecvt_base::partial:
56 | str = "partial";
57 | break;
58 | case std::codecvt_base::error:
59 | str = "error";
60 | break;
61 | case std::codecvt_base::noconv:
62 | str = "noconv";
63 | break;
64 | default:
65 | str = "unknown error";
66 | }
67 | return str;
68 | }
69 |
70 | } // unnamed namespace
71 |
72 | namespace boost
73 | {
74 | namespace filesystem
75 | {
76 |
77 | BOOST_FILESYSTEM_DECL const boost::system::error_category& codecvt_error_category()
78 | {
79 | static const codecvt_error_cat codecvt_error_cat_const;
80 | return codecvt_error_cat_const;
81 | }
82 |
83 | } // namespace filesystem
84 | } // namespace boost
85 |
--------------------------------------------------------------------------------
/src/portability.cpp:
--------------------------------------------------------------------------------
1 | // portability.cpp -------------------------------------------------------------------//
2 |
3 | // Copyright 2002-2005 Beman Dawes
4 | // Use, modification, and distribution is subject to the Boost Software
5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
6 | // at http://www.boost.org/LICENSE_1_0.txt)
7 |
8 | // See library home page at http://www.boost.org/libs/filesystem
9 |
10 | //--------------------------------------------------------------------------------------//
11 |
12 | // define BOOST_FILESYSTEM_SOURCE so that knows
13 | // the library is being built (possibly exporting rather than importing code)
14 | #define BOOST_FILESYSTEM_SOURCE
15 |
16 | #ifndef BOOST_SYSTEM_NO_DEPRECATED
17 | # define BOOST_SYSTEM_NO_DEPRECATED
18 | #endif
19 |
20 | #include
21 | #include
22 |
23 | namespace fs = boost::filesystem;
24 |
25 | #include // SGI MIPSpro compilers need this
26 |
27 | # ifdef BOOST_NO_STDC_NAMESPACE
28 | namespace std { using ::strerror; }
29 | # endif
30 |
31 | //--------------------------------------------------------------------------------------//
32 |
33 | namespace
34 | {
35 | const char invalid_chars[] =
36 | "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F"
37 | "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"
38 | "<>:\"/\\|";
39 | // note that the terminating '\0' is part of the string - thus the size below
40 | // is sizeof(invalid_chars) rather than sizeof(invalid_chars)-1. I
41 | const std::string windows_invalid_chars(invalid_chars, sizeof(invalid_chars));
42 |
43 | const std::string valid_posix(
44 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-");
45 |
46 | } // unnamed namespace
47 |
48 | namespace boost
49 | {
50 | namespace filesystem
51 | {
52 |
53 | // name_check functions ----------------------------------------------//
54 |
55 | # ifdef BOOST_WINDOWS
56 | BOOST_FILESYSTEM_DECL bool native(const std::string & name)
57 | {
58 | return windows_name(name);
59 | }
60 | # else
61 | BOOST_FILESYSTEM_DECL bool native(const std::string & name)
62 | {
63 | return name.size() != 0
64 | && name[0] != ' '
65 | && name.find('/') == std::string::npos;
66 | }
67 | # endif
68 |
69 | BOOST_FILESYSTEM_DECL bool portable_posix_name(const std::string & name)
70 | {
71 | return name.size() != 0
72 | && name.find_first_not_of(valid_posix) == std::string::npos;
73 | }
74 |
75 | BOOST_FILESYSTEM_DECL bool windows_name(const std::string & name)
76 | {
77 | return name.size() != 0
78 | && name[0] != ' '
79 | && name.find_first_of(windows_invalid_chars) == std::string::npos
80 | && *(name.end()-1) != ' '
81 | && (*(name.end()-1) != '.'
82 | || name.length() == 1 || name == "..");
83 | }
84 |
85 | BOOST_FILESYSTEM_DECL bool portable_name(const std::string & name)
86 | {
87 | return
88 | name.size() != 0
89 | && (name == "."
90 | || name == ".."
91 | || (windows_name(name)
92 | && portable_posix_name(name)
93 | && name[0] != '.' && name[0] != '-'));
94 | }
95 |
96 | BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name)
97 | {
98 | return
99 | name == "."
100 | || name == ".."
101 | || (portable_name(name)
102 | && name.find('.') == std::string::npos);
103 | }
104 |
105 | BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name)
106 | {
107 | std::string::size_type pos;
108 | return
109 | portable_name(name)
110 | && name != "."
111 | && name != ".."
112 | && ((pos = name.find('.')) == std::string::npos
113 | || (name.find('.', pos+1) == std::string::npos
114 | && (pos + 5) > name.length()))
115 | ;
116 | }
117 |
118 | } // namespace filesystem
119 | } // namespace boost
120 |
--------------------------------------------------------------------------------
/src/unique_path.cpp:
--------------------------------------------------------------------------------
1 | // filesystem unique_path.cpp --------------------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2010
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // Library home page: http://www.boost.org/libs/filesystem
9 |
10 | //--------------------------------------------------------------------------------------//
11 |
12 | // define BOOST_FILESYSTEM_SOURCE so that knows
13 | // the library is being built (possibly exporting rather than importing code)
14 | #define BOOST_FILESYSTEM_SOURCE
15 |
16 | #ifndef BOOST_SYSTEM_NO_DEPRECATED
17 | # define BOOST_SYSTEM_NO_DEPRECATED
18 | #endif
19 |
20 | #include
21 |
22 | # ifdef BOOST_POSIX_API
23 | # include
24 | # else // BOOST_WINDOWS_API
25 | # include
26 | # include
27 | # pragma comment(lib, "Advapi32.lib")
28 | # endif
29 |
30 | namespace {
31 |
32 | void fail(int err, boost::system::error_code* ec)
33 | {
34 | if (ec == 0)
35 | BOOST_FILESYSTEM_THROW( boost::system::system_error(err,
36 | boost::system::system_category(),
37 | "boost::filesystem::unique_path"));
38 |
39 | ec->assign(err, boost::system::system_category());
40 | return;
41 | }
42 |
43 | void system_crypt_random(void* buf, std::size_t len, boost::system::error_code* ec)
44 | {
45 | # ifdef BOOST_POSIX_API
46 |
47 | int file = open("/dev/urandom", O_RDONLY);
48 | if (file == -1)
49 | {
50 | file = open("/dev/random", O_RDONLY);
51 | if (file == -1)
52 | {
53 | fail(errno, ec);
54 | return;
55 | }
56 | }
57 |
58 | size_t bytes_read = 0;
59 | while (bytes_read < len)
60 | {
61 | ssize_t n = read(file, buf, len - bytes_read);
62 | if (n == -1)
63 | {
64 | close(file);
65 | fail(errno, ec);
66 | return;
67 | }
68 | bytes_read += n;
69 | buf = static_cast(buf) + n;
70 | }
71 |
72 | close(file);
73 |
74 | # else // BOOST_WINDOWS_API
75 |
76 | HCRYPTPROV handle;
77 | int errval = 0;
78 |
79 | if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, 0))
80 | {
81 | errval = ::GetLastError();
82 | if (errval == NTE_BAD_KEYSET)
83 | {
84 | if (!::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_NEWKEYSET))
85 | {
86 | errval = ::GetLastError();
87 | }
88 | else errval = 0;
89 | }
90 | }
91 |
92 | if (!errval)
93 | {
94 | BOOL gen_ok = ::CryptGenRandom(handle, len, static_cast(buf));
95 | if (!gen_ok)
96 | errval = ::GetLastError();
97 | ::CryptReleaseContext(handle, 0);
98 | }
99 |
100 | if (!errval)
101 | return;
102 |
103 | fail(errval, ec);
104 | # endif
105 | }
106 |
107 | } // unnamed namespace
108 |
109 | namespace boost { namespace filesystem { namespace detail {
110 |
111 | BOOST_FILESYSTEM_DECL
112 | path unique_path(const path& model, system::error_code* ec)
113 | {
114 | std::wstring s (model.wstring()); // std::string ng for MBCS encoded POSIX
115 | const wchar_t hex[] = L"0123456789abcdef";
116 | const int n_ran = 16;
117 | const int max_nibbles = 2 * n_ran; // 4-bits per nibble
118 | char ran[n_ran];
119 |
120 | int nibbles_used = max_nibbles;
121 | for(std::wstring::size_type i=0; i < s.size(); ++i)
122 | {
123 | if (s[i] == L'%') // digit request
124 | {
125 | if (nibbles_used == max_nibbles)
126 | {
127 | system_crypt_random(ran, sizeof(ran), ec);
128 | if (ec != 0 && *ec)
129 | return path();
130 | nibbles_used = 0;
131 | }
132 | int c = ran[nibbles_used/2];
133 | c >>= 4 * (nibbles_used++ & 1); // if odd, shift right 1 nibble
134 | s[i] = hex[c & 0xf]; // convert to hex digit and replace
135 | }
136 | }
137 |
138 | if (ec != 0)
139 | ec->clear();
140 |
141 | return s;
142 | }
143 |
144 | }}}
145 |
--------------------------------------------------------------------------------
/src/utf8_codecvt_facet.cpp:
--------------------------------------------------------------------------------
1 | // Copyright Vladimir Prus 2004.
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE_1_0.txt
4 | // or copy at http://www.boost.org/LICENSE_1_0.txt)
5 |
6 | // For HP-UX, request that WCHAR_MAX and WCHAR_MIN be defined as macros,
7 | // not casts. See ticket 5048
8 | #define _INCLUDE_STDCSOURCE_199901
9 |
10 | #ifndef BOOST_SYSTEM_NO_DEPRECATED
11 | # define BOOST_SYSTEM_NO_DEPRECATED
12 | #endif
13 |
14 | #define BOOST_FILESYSTEM_SOURCE
15 | #include
16 |
17 | #define BOOST_UTF8_BEGIN_NAMESPACE \
18 | namespace boost { namespace filesystem { namespace detail {
19 |
20 | #define BOOST_UTF8_END_NAMESPACE }}}
21 | #define BOOST_UTF8_DECL BOOST_FILESYSTEM_DECL
22 |
23 | #include
24 |
25 | #undef BOOST_UTF8_BEGIN_NAMESPACE
26 | #undef BOOST_UTF8_END_NAMESPACE
27 | #undef BOOST_UTF8_DECL
28 |
--------------------------------------------------------------------------------
/src/windows_file_codecvt.cpp:
--------------------------------------------------------------------------------
1 | // filesystem windows_file_codecvt.cpp -----------------------------------------//
2 |
3 | // Copyright Beman Dawes 2009
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // Library home page: http://www.boost.org/libs/filesystem
9 |
10 | //--------------------------------------------------------------------------------------//
11 |
12 | // define BOOST_FILESYSTEM_SOURCE so that knows
13 | // the library is being built (possibly exporting rather than importing code)
14 | #define BOOST_FILESYSTEM_SOURCE
15 |
16 | #ifndef BOOST_SYSTEM_NO_DEPRECATED
17 | # define BOOST_SYSTEM_NO_DEPRECATED
18 | #endif
19 |
20 | #include
21 | #include // for mbstate_t
22 |
23 | #ifdef BOOST_WINDOWS_API
24 |
25 | #include "windows_file_codecvt.hpp"
26 |
27 | // Versions of MinGW prior to GCC 4.6 requires this
28 | #ifndef WINVER
29 | # define WINVER 0x0500
30 | #endif
31 |
32 | #include
33 |
34 | std::codecvt_base::result windows_file_codecvt::do_in(
35 | std::mbstate_t &,
36 | const char* from, const char* from_end, const char*& from_next,
37 | wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const
38 | {
39 | UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
40 |
41 | int count;
42 | if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from,
43 | from_end - from, to, to_end - to)) == 0)
44 | {
45 | return error; // conversion failed
46 | }
47 |
48 | from_next = from_end;
49 | to_next = to + count;
50 | *to_next = L'\0';
51 | return ok;
52 | }
53 |
54 | std::codecvt_base::result windows_file_codecvt::do_out(
55 | std::mbstate_t &,
56 | const wchar_t* from, const wchar_t* from_end, const wchar_t* & from_next,
57 | char* to, char* to_end, char* & to_next) const
58 | {
59 | UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
60 |
61 | int count;
62 | if ((count = ::WideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, from,
63 | from_end - from, to, to_end - to, 0, 0)) == 0)
64 | {
65 | return error; // conversion failed
66 | }
67 |
68 | from_next = from_end;
69 | to_next = to + count;
70 | *to_next = '\0';
71 | return ok;
72 | }
73 |
74 | # endif // BOOST_WINDOWS_API
75 |
76 |
--------------------------------------------------------------------------------
/src/windows_file_codecvt.hpp:
--------------------------------------------------------------------------------
1 | // filesystem windows_file_codecvt.hpp -----------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2009
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // Library home page: http://www.boost.org/libs/filesystem
9 |
10 | #ifndef BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
11 | #define BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
12 |
13 | #include
14 | #include
15 |
16 | //------------------------------------------------------------------------------------//
17 | // //
18 | // class windows_file_codecvt //
19 | // //
20 | // Warning: partial implementation; even do_in and do_out only partially meet the //
21 | // standard library specifications as the "to" buffer must hold the entire result. //
22 | // //
23 | //------------------------------------------------------------------------------------//
24 |
25 | class BOOST_FILESYSTEM_DECL windows_file_codecvt
26 | : public std::codecvt< wchar_t, char, std::mbstate_t >
27 | {
28 | public:
29 | explicit windows_file_codecvt()
30 | : std::codecvt() {}
31 | protected:
32 |
33 | virtual bool do_always_noconv() const throw() { return false; }
34 |
35 | // seems safest to assume variable number of characters since we don't
36 | // actually know what codepage is active
37 | virtual int do_encoding() const throw() { return 0; }
38 |
39 | virtual std::codecvt_base::result do_in(std::mbstate_t& state,
40 | const char* from, const char* from_end, const char*& from_next,
41 | wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const;
42 |
43 | virtual std::codecvt_base::result do_out(std::mbstate_t & state,
44 | const wchar_t* from, const wchar_t* from_end, const wchar_t*& from_next,
45 | char* to, char* to_end, char*& to_next) const;
46 |
47 | virtual std::codecvt_base::result do_unshift(std::mbstate_t&,
48 | char* /*from*/, char* /*to*/, char* & /*next*/) const { return ok; }
49 |
50 | virtual int do_length(std::mbstate_t&,
51 | const char* /*from*/, const char* /*from_end*/, std::size_t /*max*/) const { return 0; }
52 |
53 | virtual int do_max_length() const throw () { return 0; }
54 | };
55 |
56 | #endif // BOOST_FILESYSTEM3_WIN_FILE_CODECVT_HPP
57 |
--------------------------------------------------------------------------------
/test/Jamfile.v2:
--------------------------------------------------------------------------------
1 | # Boost Filesystem Library test Jamfile
2 |
3 | # (C) Copyright Beman Dawes 2002-2006
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # See www.boost.org/LICENSE_1_0.txt
6 |
7 | project
8 | : requirements
9 | /boost/filesystem//boost_filesystem
10 | /boost/system//boost_system
11 | /boost/chrono//boost_chrono
12 | /boost/test//boost_prg_exec_monitor
13 | /boost/interop//boost_interop
14 | msvc:on
15 | ;
16 |
17 | # Some tests are run both statically and as shared libraries since Filesystem
18 | # has a history of bugs that appear only in one type of build or the other.
19 |
20 | test-suite "filesystem" :
21 | [ run convenience_test.cpp ]
22 | [ compile macro_default_test.cpp ]
23 | [ run deprecated_test.cpp ]
24 | [ run fstream_test.cpp ]
25 | [ run large_file_support_test.cpp ]
26 | [ run locale_info.cpp : : : always_show_run_output ]
27 | [ run operations_test.cpp : : : shared always_show_run_output ]
28 | [ run operations_test.cpp : : : static : operations_test_static ]
29 | [ run operations_unit_test.cpp : : : shared always_show_run_output ]
30 | [ run path_test.cpp : : : shared ]
31 | [ run path_test.cpp : : : static : path_test_static ]
32 | [ run path_unit_test.cpp : : : shared ]
33 | [ run path_unit_test.cpp : : : static : path_unit_test_static ]
34 | [ run ../example/simple_ls.cpp ]
35 | [ run ../example/file_status.cpp ]
36 |
37 | ;
38 |
--------------------------------------------------------------------------------
/test/design_use_cases.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | // Minimal class path
5 |
6 | class path
7 | {
8 | public:
9 | path( const char * )
10 | {
11 | std::cout << "path( const char * )\n";
12 | }
13 | path( const std::string & )
14 | {
15 | std::cout << "path( std::string & )\n";
16 | }
17 |
18 | // for maximum efficiency, either signature must work
19 | # ifdef BY_VALUE
20 | operator const std::string() const
21 | # else
22 | operator const std::string&() const
23 | # endif
24 | {
25 | std::cout << "operator string\n";
26 | return m_path;
27 | }
28 |
29 | #ifdef NAMED_CONVERSION
30 | std::string string() const
31 | {
32 | std::cout << "std::string string() const\n";
33 | return m_path;
34 | }
35 | #endif
36 |
37 | private:
38 | std::string m_path;
39 | };
40 |
41 | bool operator==( const path &, const path & )
42 | {
43 | std::cout << "operator==( const path &, const path & )\n";
44 | return true;
45 | }
46 |
47 | // These are the critical use cases. If any of these don't compile, usability
48 | // is unacceptably degraded.
49 |
50 | void f( const path & )
51 | {
52 | std::cout << "f( const path & )\n";
53 | }
54 |
55 | int main()
56 | {
57 | f( "foo" );
58 | f( std::string( "foo" ) );
59 | f( path( "foo" ) );
60 |
61 | std::cout << '\n';
62 |
63 | std::string s1( path( "foo" ) );
64 | std::string s2 = path( "foo" );
65 | s2 = path( "foo" );
66 |
67 | #ifdef NAMED_CONVERSION
68 | s2 = path( "foo" ).string();
69 | #endif
70 |
71 | std::cout << '\n';
72 |
73 | // these must call bool path( const path &, const path & );
74 | path( "foo" ) == path( "foo" );
75 | path( "foo" ) == "foo";
76 | path( "foo" ) == std::string( "foo" );
77 | "foo" == path( "foo" );
78 | std::string( "foo" ) == path( "foo" );
79 |
80 | return 0;
81 | }
82 |
--------------------------------------------------------------------------------
/test/equivalent.cpp:
--------------------------------------------------------------------------------
1 | // equivalent program -------------------------------------------------------//
2 |
3 | // Copyright (c) 2004 Beman Dawes
4 |
5 | // Use, modification, and distribution is subject to the Boost Software
6 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
7 | // at http://www.boost.org/LICENSE_1_0.txt)
8 |
9 | // See library home page at http://www.boost.org/libs/filesystem
10 |
11 | //----------------------------------------------------------------------------//
12 |
13 | #include
14 | #include
15 | #include
16 |
17 | int main( int argc, char * argv[] )
18 | {
19 | boost::filesystem::path::default_name_check( boost::filesystem::native );
20 | if ( argc != 3 )
21 | {
22 | std::cout << "Usage: equivalent path1 path2\n";
23 | return 2;
24 | }
25 |
26 | bool eq;
27 | try
28 | {
29 | eq = boost::filesystem::equivalent( argv[1], argv[2] );
30 | }
31 | catch ( const std::exception & ex )
32 | {
33 | std::cout << ex.what() << "\n";
34 | return 3;
35 | }
36 |
37 | std::cout << (eq ? "Paths are equivalent\n" : "Paths are not equivalent\n");
38 | return !eq;
39 | }
40 |
--------------------------------------------------------------------------------
/test/fstream_test.cpp:
--------------------------------------------------------------------------------
1 | // fstream_test.cpp ------------------------------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2002
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // Library home page: http://www.boost.org/libs/filesystem
9 |
10 | #include
11 |
12 | // See deprecated_test for tests of deprecated features
13 | #ifndef BOOST_FILESYSTEM_NO_DEPRECATED
14 | # define BOOST_FILESYSTEM_NO_DEPRECATED
15 | #endif
16 | #ifndef BOOST_SYSTEM_NO_DEPRECATED
17 | # define BOOST_SYSTEM_NO_DEPRECATED
18 | #endif
19 |
20 | #include
21 |
22 | #include
23 | # if defined( BOOST_NO_STD_WSTRING )
24 | # error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
25 | # endif
26 |
27 | #include
28 | #include
29 | #include
30 | #include // for std::remove
31 |
32 | #include
33 |
34 | namespace fs = boost::filesystem;
35 |
36 | #include
37 | #ifdef BOOST_NO_STDC_NAMESPACE
38 | namespace std { using ::remove; }
39 | #endif
40 |
41 | #include
42 | #include
43 |
44 | namespace
45 | {
46 | bool cleanup = true;
47 |
48 | void test(const fs::path & p)
49 | {
50 | fs::remove(p);
51 | {
52 | std::cout << " in test 1\n";
53 | fs::filebuf fb1;
54 | fb1.open(p, std::ios_base::out);
55 | BOOST_TEST(fb1.is_open());
56 | }
57 | {
58 | std::cout << " in test 2\n";
59 | fs::filebuf fb2;
60 | fb2.open(p, std::ios_base::in);
61 | BOOST_TEST(fb2.is_open());
62 | }
63 | {
64 | std::cout << " in test 3\n";
65 | fs::ifstream tfs(p);
66 | BOOST_TEST(tfs.is_open());
67 | }
68 | {
69 | std::cout << " in test 4\n";
70 | fs::ifstream tfs(p / p.filename()); // should fail
71 | BOOST_TEST(!tfs.is_open());
72 | }
73 | {
74 | std::cout << " in test 5\n";
75 | fs::ifstream tfs(p, std::ios_base::in);
76 | BOOST_TEST(tfs.is_open());
77 | }
78 | {
79 | std::cout << " in test 6\n";
80 | fs::ifstream tfs;
81 | tfs.open(p);
82 | BOOST_TEST(tfs.is_open());
83 | }
84 | {
85 | std::cout << " in test 7\n";
86 | fs::ifstream tfs;
87 | tfs.open(p, std::ios_base::in);
88 | BOOST_TEST(tfs.is_open());
89 | }
90 | {
91 | std::cout << " in test 8\n";
92 | fs::ofstream tfs(p);
93 | BOOST_TEST(tfs.is_open());
94 | }
95 | {
96 | std::cout << " in test 9\n";
97 | fs::ofstream tfs(p, std::ios_base::out);
98 | BOOST_TEST(tfs.is_open());
99 | }
100 | {
101 | std::cout << " in test 10\n";
102 | fs::ofstream tfs;
103 | tfs.open(p);
104 | BOOST_TEST(tfs.is_open());
105 | }
106 | {
107 | std::cout << " in test 11\n";
108 | fs::ofstream tfs;
109 | tfs.open(p, std::ios_base::out);
110 | BOOST_TEST(tfs.is_open());
111 | }
112 | {
113 | std::cout << " in test 12\n";
114 | fs::fstream tfs(p);
115 | BOOST_TEST(tfs.is_open());
116 | }
117 | {
118 | std::cout << " in test 13\n";
119 | fs::fstream tfs(p, std::ios_base::in|std::ios_base::out);
120 | BOOST_TEST(tfs.is_open());
121 | }
122 | {
123 | std::cout << " in test 14\n";
124 | fs::fstream tfs;
125 | tfs.open(p);
126 | BOOST_TEST(tfs.is_open());
127 | }
128 | {
129 | std::cout << " in test 15\n";
130 | fs::fstream tfs;
131 | tfs.open(p, std::ios_base::in|std::ios_base::out);
132 | BOOST_TEST(tfs.is_open());
133 | }
134 |
135 | if (cleanup)
136 | fs::remove(p);
137 |
138 | } // test
139 | } // unnamed namespace
140 |
141 | int cpp_main(int argc, char*[])
142 | {
143 | if (argc > 1) cleanup = false;
144 |
145 | std::cout << "BOOST_FILESYSTEM_C_STR defined as \""
146 | << BOOST_STRINGIZE(BOOST_FILESYSTEM_C_STR) << "\"\n";
147 |
148 | // test narrow characters
149 | std::cout << "narrow character tests:\n";
150 | test("narrow_fstream_test");
151 |
152 |
153 | // So that tests are run with known encoding, use Boost UTF-8 codecvt
154 | std::locale global_loc = std::locale();
155 | std::locale loc(global_loc, new fs::detail::utf8_codecvt_facet);
156 | fs::path::imbue(loc);
157 |
158 | // test with some wide characters
159 | // \u2780 is circled 1 against white background == e2 9e 80 in UTF-8
160 | // \u2781 is circled 2 against white background == e2 9e 81 in UTF-8
161 | // \u263A is a white smiling face
162 | std::cout << "\nwide character tests:\n";
163 | std::wstring ws(L"wide_fstream_test_");
164 | ws += 0x2780;
165 | ws += 0x263A;
166 | test(ws);
167 |
168 | return ::boost::report_errors();
169 | }
170 |
--------------------------------------------------------------------------------
/test/large_file_support_test.cpp:
--------------------------------------------------------------------------------
1 | // Boost large_file_support_test.cpp ---------------------------------------//
2 |
3 | // Copyright Beman Dawes 2004.
4 | // Use, modification, and distribution is subject to the Boost Software
5 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 | // http://www.boost.org/LICENSE_1_0.txt)
7 |
8 | // See library home page at http://www.boost.org/libs/filesystem
9 |
10 | // See deprecated_test for tests of deprecated features
11 | #define BOOST_FILESYSTEM_NO_DEPRECATED
12 | #define BOOST_SYSTEM_NO_DEPRECATED
13 |
14 | #include
15 |
16 | #include
17 | # if defined( BOOST_NO_STD_WSTRING )
18 | # error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
19 | # endif
20 |
21 | namespace fs = boost::filesystem;
22 |
23 | #include
24 |
25 | int main()
26 | {
27 | if ( fs::detail::possible_large_file_size_support() )
28 | {
29 | std::cout << "It appears that file sizes greater that 2 gigabytes are possible\n"
30 | "for this configuration on this platform since the operating system\n"
31 | "does use a large enough integer type to report large file sizes.\n\n"
32 | "Whether or not such support is actually present depends on the OS\n";
33 | return 0;
34 | }
35 | std::cout << "The operating system is using an integer type to report file sizes\n"
36 | "that can not represent file sizes greater that 2 gigabytes (31-bits).\n"
37 | "Thus the Filesystem Library will not correctly deal with such large\n"
38 | "files. If you think that this operatiing system should be able to\n"
39 | "support large files, please report the problem to the Boost developers\n"
40 | "mailing list.\n";
41 | return 1;
42 | }
43 |
--------------------------------------------------------------------------------
/test/locale_info.cpp:
--------------------------------------------------------------------------------
1 | // locale_info.cpp ---------------------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2011
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | #ifndef BOOST_NO_CXX11_HDR_CODECVT
15 | # include
16 | #endif
17 |
18 | using namespace std;
19 |
20 | #ifdef _MSC_VER
21 | # pragma warning(push)
22 | # pragma warning(disable: 4996) // ... Function call with parameters that may be unsafe
23 | #endif
24 |
25 | namespace
26 | {
27 | void facet_info(const locale& loc, const char* msg)
28 | {
29 | cout << "has_facet >("
30 | << msg << ") is "
31 | << (has_facet >(loc)
32 | ? "true\n"
33 | : "false\n");
34 | cout << "has_facet >("
35 | << msg << ") is "
36 | << (has_facet >(loc)
37 | ? "true\n"
38 | : "false\n");
39 | #ifndef BOOST_NO_CXX11_HDR_CODECVT
40 | cout << "has_facet >("
41 | << msg << ") is "
42 | << (has_facet >(loc)
43 | ? "true\n"
44 | : "false\n");
45 | #endif
46 | #ifndef BOOST_NO_CXX11_HDR_CODECVT
47 | cout << "has_facet >("
48 | << msg << ") is "
49 | << (has_facet >(loc)
50 | ? "true\n"
51 | : "false\n");
52 | #endif
53 | }
54 |
55 | void default_info()
56 | {
57 | try
58 | {
59 | locale loc;
60 | cout << "\nlocale default construction OK, name is " << loc.name() << endl;
61 | facet_info(loc, "locale()");
62 | }
63 | catch (const exception& ex)
64 | {
65 | cout << "\nlocale default construction threw: " << ex.what() << endl;
66 | }
67 | }
68 |
69 | void null_string_info()
70 | {
71 | try
72 | {
73 | locale loc("");
74 | cout << "\nlocale(\"\") construction OK, name is " << loc.name() << endl;
75 | facet_info(loc, "locale(\"\")");
76 | }
77 | catch (const exception& ex)
78 | {
79 | cout << "\nlocale(\"\") construction threw: " << ex.what() << endl;
80 | }
81 | }
82 |
83 | void classic_info()
84 | {
85 | try
86 | {
87 | locale loc(locale::classic());
88 | cout << "\nlocale(locale::classic()) copy construction OK, name is " << loc.name() << endl;
89 | facet_info(loc, "locale::classic()");
90 | }
91 | catch (const exception& ex)
92 | {
93 | cout << "\nlocale(locale::clasic()) copy construction threw: " << ex.what() << endl;
94 | }
95 | }
96 |
97 | void codecvt_info(const locale& loc)
98 | {
99 | cout << "\ncodecvt conversion for locale " << loc.name() << endl;
100 |
101 | char s[128];
102 | wchar_t ws[128];
103 |
104 | for (int i = 0; i < 128; ++i)
105 | {
106 | s[i] = char(128 + i);
107 | ws[i] = L'\0';
108 | }
109 |
110 | mbstate_t state = mbstate_t(); // VC++ needs initialization
111 | const char* from_next;
112 | wchar_t* to_next;
113 | codecvt::result result;
114 |
115 | try
116 | {
117 | result = use_facet >(loc).in(state, s, s+128, from_next, ws, ws+128, to_next);
118 | }
119 | catch (const runtime_error& x)
120 | {
121 | cout << "exception: " << x.what() << endl;
122 | return;
123 | }
124 |
125 | if (result != codecvt::ok)
126 | {
127 | cout << "Oops! conversion returned " << result << endl;
128 | return;
129 | }
130 |
131 | cout << hex;
132 | for (int i = 0; i < 128; ++i)
133 | {
134 | cout << s[i] << ':' << (unsigned short)(ws[i]);
135 | if (i % 8)
136 | cout << ',';
137 | else
138 | cout << endl;
139 | }
140 | cout << endl;
141 | }
142 | }
143 |
144 | int main()
145 | {
146 | const char* lang = getenv("LANG");
147 | cout << "\nLANG environmental variable is "
148 | << (lang ? lang : "not present") << endl;
149 |
150 | #ifndef BOOST_NO_CXX11_HDR_CODECVT
151 | cout << "BOOST_NO_CXX11_HDR_CODECVT is not defined" << endl;
152 | #else
153 | cout << "BOOST_NO_CXX11_HDR_CODECVT is defined" << endl;
154 | #endif
155 |
156 | #ifndef BOOST_NO_CXX11_CHAR16_T
157 | cout << "BOOST_NO_CXX11_CHAR16_T is not defined" << endl;
158 | #else
159 | cout << "BOOST_NO_CXX11_CHAR16_T is defined" << endl;
160 | #endif
161 |
162 | #ifndef BOOST_NO_CXX11_CHAR32_T
163 | cout << "BOOST_NO_CXX11_CHAR32_T is not defined" << endl;
164 | #else
165 | cout << "BOOST_NO_CXX11_CHAR32_T is defined" << endl;
166 | #endif
167 |
168 | default_info();
169 | null_string_info();
170 | classic_info();
171 |
172 | codecvt_info(locale());
173 | codecvt_info(locale(""));
174 |
175 | return 0;
176 | }
177 |
178 | #ifdef _MSC_VER
179 | # pragma warning(pop)
180 | #endif
181 |
--------------------------------------------------------------------------------
/test/long_path_test.cpp:
--------------------------------------------------------------------------------
1 | // long_path_test.cpp ----------------------------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2011
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // See http://www.boost.org/libs/btree for documentation.
9 |
10 | // See http://msdn.microsoft.com/en-us/library/aa365247%28v=vs.85%29.aspx
11 |
12 | #include
13 |
14 | #include
15 | #include
16 | #include
17 |
18 | using namespace boost::filesystem;
19 |
20 | #include
21 |
22 | #ifndef BOOST_LIGHTWEIGHT_MAIN
23 | # include
24 | #else
25 | # include
26 | #endif
27 |
28 | namespace
29 | {
30 | } // unnamed namespace
31 |
32 | int cpp_main(int, char*[])
33 | {
34 |
35 | std::string prefix("d:\\temp\\");
36 | std::cout << "prefix is " << prefix << '\n';
37 |
38 | const std::size_t safe_size
39 | = 260 - prefix.size() - 100; // Windows MAX_PATH is 260
40 |
41 | std::string safe_x_string(safe_size, 'x');
42 | std::string safe_y_string(safe_size, 'y');
43 | std::string path_escape("\\\\?\\");
44 |
45 | path x_p(prefix + safe_x_string);
46 | path y_p(path_escape + prefix + safe_x_string + "\\" + safe_y_string);
47 |
48 | std::cout << "x_p.native().size() is " << x_p.native().size() << '\n';
49 | std::cout << "y_p.native().size() is " << y_p.native().size() << '\n';
50 |
51 | create_directory(x_p);
52 | BOOST_TEST(exists(x_p));
53 | create_directory(y_p);
54 | BOOST_TEST(exists(y_p));
55 |
56 | //std::cout << "directory x.../y... ready for testing, where ... is " << safe_size
57 | // << " repeats of x and y, respectively\n";
58 |
59 | BOOST_TEST(exists(x_p));
60 |
61 | //remove_all(x_p);
62 |
63 | return ::boost::report_errors();
64 | }
65 |
--------------------------------------------------------------------------------
/test/macro_default_test.cpp:
--------------------------------------------------------------------------------
1 | // macro_default_test program --------------------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2012
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // Library home page: http://www.boost.org/libs/filesystem
9 |
10 | #undef BOOST_ALL_DYN_LINK
11 | #undef BOOST_ALL_STATIC_LINK
12 | #undef BOOST_FILESYSTEM_DYN_LINK
13 | #undef BOOST_FILESYSTEM_STATIC_LINK
14 | #undef BOOST_SYSTEM_DYN_LINK
15 | #undef BOOST_SYSTEM_STATIC_LINK
16 |
17 | #ifndef BOOST_ALL_NO_LIB
18 | # define BOOST_ALL_NO_LIB
19 | #endif
20 |
21 | #include
22 | #include
23 |
24 | #ifndef BOOST_FILESYSTEM_STATIC_LINK
25 | # error BOOST_FILESYSTEM_STATIC_LINK not set by default
26 | #endif
27 |
28 |
29 | #ifndef BOOST_SYSTEM_STATIC_LINK
30 | # error BOOST_SYSTEM_STATIC_LINK not set by default
31 | #endif
32 |
33 | int main()
34 | {
35 | return 0;
36 | }
37 |
--------------------------------------------------------------------------------
/test/msvc10/common.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <_ProjectFileVersion>10.0.30319.1
5 | $(TEMP)\$(SolutionName)\$(Configuration)\
6 | $(TEMP)\$(SolutionName)\$(ProjectName)\$(Configuration)\
7 |
8 |
9 |
10 | ../../../../..;%(AdditionalIncludeDirectories)
11 | BOOST_SYSTEM_NO_DEPRECATED;BOOST_ALL_NO_LIB;BOOST_ALL_DYN_LINK;BOOST_FILESYSTEM_USE_TIME_T;%(PreprocessorDefinitions)
12 | Async
13 | false
14 | Level4
15 |
16 |
17 | %(AdditionalLibraryDirectories)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/test/msvc10/convenience_test/convenience_test.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {08986FB5-0C83-4BC4-92DF-05E12E1C03C1}
15 | convenience_test
16 | Win32Proj
17 |
18 |
19 |
20 | Application
21 | Unicode
22 | true
23 |
24 |
25 | Application
26 | Unicode
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | <_ProjectFileVersion>10.0.30319.1
42 | true
43 | false
44 |
45 |
46 |
47 | Disabled
48 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
49 | true
50 | EnableFastChecks
51 | MultiThreadedDebugDLL
52 |
53 |
54 | Level4
55 | EditAndContinue
56 |
57 |
58 | true
59 | Console
60 | MachineX86
61 |
62 |
63 | Executing test $(TargetName).exe...
64 | "$(TargetDir)\$(TargetName).exe"
65 |
66 |
67 |
68 |
69 | MaxSpeed
70 | true
71 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
72 | MultiThreadedDLL
73 | true
74 |
75 |
76 | Level4
77 | ProgramDatabase
78 |
79 |
80 | true
81 | Console
82 | true
83 | true
84 | MachineX86
85 |
86 |
87 | Executing test $(TargetName).exe...
88 | "$(TargetDir)\$(TargetName).exe"
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | {0ea788ca-fa52-4290-a4d0-f616390b203b}
97 |
98 |
99 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
100 | false
101 |
102 |
103 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
104 | false
105 |
106 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/test/msvc10/exec_monitor_dll/exec_monitor_dll.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {0EA788CA-FA52-4290-A4D0-F616390B203B}
15 | Win32Proj
16 | exec_monitor_dll
17 |
18 |
19 |
20 | DynamicLibrary
21 | true
22 | Unicode
23 |
24 |
25 | DynamicLibrary
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;EXEC_MONITOR_DLL_EXPORTS;%(PreprocessorDefinitions)
55 |
56 |
57 | Windows
58 | true
59 |
60 |
61 |
62 |
63 | Level3
64 |
65 |
66 | MaxSpeed
67 | true
68 | true
69 | WIN32;NDEBUG;_WINDOWS;_USRDLL;EXEC_MONITOR_DLL_EXPORTS;%(PreprocessorDefinitions)
70 |
71 |
72 | Windows
73 | true
74 | true
75 | true
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/test/msvc10/exec_monitor_lib/exec_monitor_lib.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {272DFC15-6292-49DF-B457-6784A183EAC3}
20 | Win32Proj
21 | exec_monitor_lib
22 |
23 |
24 |
25 | StaticLibrary
26 | true
27 | Unicode
28 |
29 |
30 | StaticLibrary
31 | false
32 | true
33 | Unicode
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | NotUsing
49 | Level3
50 | Disabled
51 | BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
52 | ../../../../..;%(AdditionalIncludeDirectories)
53 |
54 |
55 | Windows
56 | true
57 |
58 |
59 |
60 |
61 | Level3
62 | NotUsing
63 | MaxSpeed
64 | true
65 | true
66 | BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
67 | ../../../../..;%(AdditionalIncludeDirectories)
68 |
69 |
70 | Windows
71 | true
72 | true
73 | true
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/test/msvc10/file_status/file_status.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {43C4B4D8-0893-4C86-B9FD-6A7DEB1A4426}
15 | Win32Proj
16 | file_status
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 | "$(TargetDir)\$(TargetName).exe"
62 | Executing test $(TargetName).exe...
63 |
64 |
65 |
66 |
67 | Level3
68 |
69 |
70 | MaxSpeed
71 | true
72 | true
73 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
74 |
75 |
76 | Console
77 | true
78 | true
79 | true
80 |
81 |
82 | "$(TargetDir)\$(TargetName).exe"
83 | Executing test $(TargetName).exe...
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | {0ea788ca-fa52-4290-a4d0-f616390b203b}
92 |
93 |
94 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
95 |
96 |
97 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/test/msvc10/filesystem_lib/filesystem_lib.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | {3640605d-6f82-493d-879f-8f30762da554}
26 |
27 |
28 |
29 | {2C1770A4-4AC3-4102-9D36-E652DBB686D8}
30 | Win32Proj
31 | filesystem_lib
32 |
33 |
34 |
35 | StaticLibrary
36 | true
37 | Unicode
38 |
39 |
40 | StaticLibrary
41 | false
42 | true
43 | Unicode
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | Level3
61 | Disabled
62 | BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
63 | ../../../../..
64 |
65 |
66 | Windows
67 | true
68 |
69 |
70 |
71 |
72 | Level3
73 |
74 |
75 | MaxSpeed
76 | true
77 | true
78 | BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
79 | ../../../../..
80 |
81 |
82 | Windows
83 | true
84 | true
85 | true
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/test/msvc10/fstream_test/fstream_test.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {A9939CD7-BE1C-4334-947C-4C320D49B3CA}
15 | fstream_test
16 | Win32Proj
17 |
18 |
19 |
20 | Application
21 | Unicode
22 | true
23 |
24 |
25 | Application
26 | Unicode
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | <_ProjectFileVersion>10.0.30319.1
42 | true
43 | false
44 |
45 |
46 |
47 | Disabled
48 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
49 | true
50 | EnableFastChecks
51 | MultiThreadedDebugDLL
52 |
53 |
54 | Level4
55 | EditAndContinue
56 |
57 |
58 | true
59 | Console
60 | MachineX86
61 |
62 |
63 | Executing test $(TargetName).exe...
64 | "$(TargetDir)\$(TargetName).exe" -no-cleanup
65 |
66 |
67 |
68 |
69 | MaxSpeed
70 | true
71 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
72 | MultiThreadedDLL
73 | true
74 |
75 |
76 | Level4
77 | ProgramDatabase
78 |
79 |
80 | true
81 | Console
82 | true
83 | true
84 | MachineX86
85 |
86 |
87 | Executing test $(TargetName).exe...
88 | "$(TargetDir)\$(TargetName).exe" -no-cleanup
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
97 | false
98 |
99 |
100 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
101 | false
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/test/msvc10/interop_dll/interop_dll.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {D9104E71-73E5-4603-882B-201B811C3540}
15 | Win32Proj
16 | interop_dll
17 |
18 |
19 |
20 | DynamicLibrary
21 | true
22 | Unicode
23 |
24 |
25 | DynamicLibrary
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;INTEROP_DLL_EXPORTS;%(PreprocessorDefinitions)
55 |
56 |
57 | Windows
58 | true
59 |
60 |
61 |
62 |
63 | Level3
64 |
65 |
66 | MaxSpeed
67 | true
68 | true
69 | WIN32;NDEBUG;_WINDOWS;_USRDLL;INTEROP_DLL_EXPORTS;%(PreprocessorDefinitions)
70 |
71 |
72 | Windows
73 | true
74 | true
75 | true
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/test/msvc10/locale_info/locale_info.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {3667C35E-78D5-43D4-AAC2-349145E4341D}
15 | Win32Proj
16 | locale_info
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 | "$(TargetDir)\$(TargetName).exe"
62 |
63 |
64 | Executing test $(TargetName).exe...
65 |
66 |
67 |
68 |
69 | Level3
70 |
71 |
72 | MaxSpeed
73 | true
74 | true
75 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
76 |
77 |
78 | Console
79 | true
80 | true
81 | true
82 |
83 |
84 | "$(TargetDir)\$(TargetName).exe"
85 |
86 |
87 | Executing test $(TargetName).exe...
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/test/msvc10/long_path_test/long_path_test.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {1A6A7DAF-8705-4B2B-83B5-93F84A63496C}
15 | Win32Proj
16 | long_path_test
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 | "$(TargetDir)\$(TargetName).exe"
62 | Executing test $(TargetName).exe...
63 |
64 |
65 |
66 |
67 | Level3
68 |
69 |
70 | MaxSpeed
71 | true
72 | true
73 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
74 |
75 |
76 | Console
77 | true
78 | true
79 | true
80 |
81 |
82 | "$(TargetDir)\$(TargetName).exe"
83 | Executing test $(TargetName).exe...
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | {0ea788ca-fa52-4290-a4d0-f616390b203b}
92 |
93 |
94 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
95 |
96 |
97 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/test/msvc10/macro_default_test/macro_default_test.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {36E2032D-F9E6-4FBA-9630-3D4AC518DC6C}
15 | Win32Proj
16 | macro_default_test
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | true
42 |
43 |
44 | false
45 |
46 |
47 |
48 |
49 |
50 | Level3
51 | Disabled
52 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
53 | ../../../../..
54 |
55 |
56 | Console
57 | true
58 |
59 |
60 |
61 |
62 | Level3
63 |
64 |
65 | MaxSpeed
66 | true
67 | true
68 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
69 |
70 |
71 | Console
72 | true
73 | true
74 | true
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | {2c1770a4-4ac3-4102-9d36-e652dbb686d8}
83 |
84 |
85 | {3640605d-6f82-493d-879f-8f30762da554}
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/test/msvc10/operations_test/operations_test.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {8BB7E604-46EF-42BE-ABB5-D7044B3E8A40}
15 | operations_test
16 | Win32Proj
17 |
18 |
19 |
20 | Application
21 | Unicode
22 | true
23 |
24 |
25 | Application
26 | Unicode
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | <_ProjectFileVersion>10.0.30319.1
42 | true
43 | false
44 |
45 |
46 |
47 | Disabled
48 | BOOST_FILEYSTEM_INCLUDE_IOSTREAM;%(PreprocessorDefinitions)
49 | true
50 | EnableFastChecks
51 | MultiThreadedDebugDLL
52 |
53 |
54 | Level4
55 | EditAndContinue
56 |
57 |
58 | true
59 | Console
60 | MachineX86
61 |
62 |
63 | Executing test $(TargetName).exe...
64 | "$(TargetDir)\$(TargetName).exe"
65 |
66 |
67 |
68 |
69 | MaxSpeed
70 | true
71 | MultiThreadedDLL
72 | true
73 |
74 |
75 | Level4
76 | ProgramDatabase
77 |
78 |
79 | true
80 | Console
81 | true
82 | true
83 | MachineX86
84 |
85 |
86 | Executing test $(TargetName).exe...
87 | "$(TargetDir)\$(TargetName).exe"
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | {0ea788ca-fa52-4290-a4d0-f616390b203b}
96 |
97 |
98 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
99 | false
100 |
101 |
102 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
103 | false
104 |
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/test/msvc10/path_test_static/path_test_static.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {3B3010C5-D6D7-4320-A992-4EA61F256279}
15 | Win32Proj
16 | path_test_static
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | true
42 |
43 |
44 | false
45 |
46 |
47 |
48 |
49 |
50 | Level3
51 | Disabled
52 | BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
53 | ../../../../..
54 |
55 |
56 | Console
57 | true
58 |
59 |
60 | "$(TargetDir)\$(TargetName).exe"
61 |
62 |
63 | Executing test $(TargetName).exe...
64 |
65 |
66 |
67 |
68 | Level3
69 |
70 |
71 | MaxSpeed
72 | true
73 | true
74 | BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
75 | ../../../../..
76 |
77 |
78 | Console
79 | true
80 | true
81 | true
82 |
83 |
84 | "$(TargetDir)\$(TargetName).exe"
85 |
86 |
87 | Executing test $(TargetName).exe...
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | {272dfc15-6292-49df-b457-6784a183eac3}
96 |
97 |
98 | {2c1770a4-4ac3-4102-9d36-e652dbb686d8}
99 |
100 |
101 | {3640605d-6f82-493d-879f-8f30762da554}
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/test/msvc10/stems/stems.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {23C735E1-0195-467F-BE9F-314829402FCF}
15 | Win32Proj
16 | stems
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 |
62 |
63 | Level3
64 |
65 |
66 | MaxSpeed
67 | true
68 | true
69 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
70 |
71 |
72 | Console
73 | true
74 | true
75 | true
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
84 |
85 |
86 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/test/msvc10/system_dll/system_dll.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 |
15 |
16 |
17 | {F94CCADD-A90B-480C-A304-C19D015D36B1}
18 | system_dll
19 | Win32Proj
20 |
21 |
22 |
23 | DynamicLibrary
24 | Unicode
25 | true
26 |
27 |
28 | DynamicLibrary
29 | Unicode
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | <_ProjectFileVersion>10.0.30319.1
45 | $(TEMP)\$(SolutionName)\$(Configuration)\
46 | $(TEMP)\$(SolutionName)\$(ProjectName)\$(Configuration)\
47 | true
48 | $(TEMP)\$(SolutionName)\$(Configuration)\
49 | $(TEMP)\$(SolutionName)\$(ProjectName)\$(Configuration)\
50 | false
51 |
52 |
53 |
54 | Disabled
55 | BOOST_ALL_NO_LIB;BOOST_ALL_DYN_LINK;WIN32;_DEBUG;_WINDOWS;_USRDLL;SYSTEM_DLL_EXPORTS;%(PreprocessorDefinitions)
56 | true
57 | Async
58 | EnableFastChecks
59 | MultiThreadedDebugDLL
60 |
61 |
62 | Level4
63 | EditAndContinue
64 |
65 |
66 | true
67 | Windows
68 | MachineX86
69 |
70 |
71 |
72 |
73 | MaxSpeed
74 | true
75 | BOOST_ALL_NO_LIB;BOOST_ALL_DYN_LINK;WIN32;NDEBUG;_WINDOWS;_USRDLL;SYSTEM_DLL_EXPORTS;%(PreprocessorDefinitions)
76 | Async
77 | MultiThreadedDLL
78 | true
79 |
80 |
81 | Level4
82 | ProgramDatabase
83 |
84 |
85 | true
86 | Windows
87 | true
88 | true
89 | MachineX86
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/test/msvc10/system_lib/system_lib.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {3640605D-6F82-493D-879F-8F30762DA554}
15 | Win32Proj
16 | system_lib
17 |
18 |
19 |
20 | StaticLibrary
21 | true
22 | Unicode
23 |
24 |
25 | StaticLibrary
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | Level3
46 | Disabled
47 | BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
48 | ../../../../..
49 |
50 |
51 | Windows
52 | true
53 |
54 |
55 |
56 |
57 | Level3
58 |
59 |
60 | MaxSpeed
61 | true
62 | true
63 | BOOST_ALL_NO_LIB;BOOST_ALL_STATIC_LINK;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
64 | ../../../../..
65 |
66 |
67 | Windows
68 | true
69 | true
70 | true
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/test/msvc10/tut1/tut1.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {6376B8E4-7FD4-466B-978E-E8DA6E938689}
15 | tut1
16 | Win32Proj
17 |
18 |
19 |
20 | Application
21 | Unicode
22 | true
23 |
24 |
25 | Application
26 | Unicode
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | <_ProjectFileVersion>10.0.30319.1
42 | true
43 | false
44 |
45 |
46 |
47 | Disabled
48 | %(AdditionalIncludeDirectories)
49 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
50 | true
51 | EnableFastChecks
52 | MultiThreadedDebugDLL
53 |
54 |
55 | Level4
56 | EditAndContinue
57 |
58 |
59 | true
60 | Console
61 | MachineX86
62 |
63 |
64 |
65 |
66 | MaxSpeed
67 | true
68 | %(AdditionalIncludeDirectories)
69 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
70 | MultiThreadedDLL
71 | true
72 |
73 |
74 | Level4
75 | ProgramDatabase
76 |
77 |
78 | true
79 | Console
80 | true
81 | true
82 | MachineX86
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
91 | false
92 |
93 |
94 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
95 | false
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/test/msvc10/tut2/tut2.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {CD69B175-389E-4F8F-85DC-03C56A47CD1D}
15 | tut2
16 | Win32Proj
17 |
18 |
19 |
20 | Application
21 | Unicode
22 | true
23 |
24 |
25 | Application
26 | Unicode
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | <_ProjectFileVersion>10.0.30319.1
42 | true
43 | false
44 |
45 |
46 |
47 | Disabled
48 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
49 | true
50 | EnableFastChecks
51 | MultiThreadedDebugDLL
52 |
53 |
54 | EditAndContinue
55 |
56 |
57 | true
58 | Console
59 | MachineX86
60 |
61 |
62 |
63 |
64 | MaxSpeed
65 | true
66 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
67 | MultiThreadedDLL
68 | true
69 |
70 |
71 | ProgramDatabase
72 |
73 |
74 | true
75 | Console
76 | true
77 | true
78 | MachineX86
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
87 | false
88 |
89 |
90 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
91 | false
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/test/msvc10/tut3/tut3.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {4FF64FA7-6806-401D-865C-79DD064D4A9E}
15 | tut3
16 | Win32Proj
17 |
18 |
19 |
20 | Application
21 | Unicode
22 | true
23 |
24 |
25 | Application
26 | Unicode
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | <_ProjectFileVersion>10.0.30319.1
42 | true
43 | false
44 |
45 |
46 |
47 | Disabled
48 | true
49 | EnableFastChecks
50 | MultiThreadedDebugDLL
51 |
52 |
53 | EditAndContinue
54 |
55 |
56 | true
57 | Console
58 | MachineX86
59 |
60 |
61 |
62 |
63 | MaxSpeed
64 | true
65 | MultiThreadedDLL
66 | true
67 |
68 |
69 | ProgramDatabase
70 |
71 |
72 | true
73 | Console
74 | true
75 | true
76 | MachineX86
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
85 | false
86 |
87 |
88 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
89 | false
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/test/msvc10/tut4/tut4.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {256EA89A-E073-4CE8-B675-BE2FBC6B2691}
15 | tut4
16 | Win32Proj
17 |
18 |
19 |
20 | Application
21 | Unicode
22 | true
23 |
24 |
25 | Application
26 | Unicode
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | <_ProjectFileVersion>10.0.30319.1
42 | true
43 | false
44 |
45 |
46 |
47 | Disabled
48 | %(AdditionalIncludeDirectories)
49 | true
50 | EnableFastChecks
51 | MultiThreadedDebugDLL
52 |
53 |
54 | EditAndContinue
55 |
56 |
57 | true
58 | Console
59 | MachineX86
60 |
61 |
62 |
63 |
64 | MaxSpeed
65 | true
66 | %(AdditionalIncludeDirectories)
67 | MultiThreadedDLL
68 | true
69 |
70 |
71 | ProgramDatabase
72 |
73 |
74 | true
75 | Console
76 | true
77 | true
78 | MachineX86
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
87 | false
88 |
89 |
90 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
91 | false
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/test/msvc10/tut5/tut5.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {5C9B3380-3C6E-45CC-986A-16D245E27E58}
15 | Win32Proj
16 | tut5
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 |
62 |
63 | Level3
64 |
65 |
66 | MaxSpeed
67 | true
68 | true
69 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
70 |
71 |
72 | Console
73 | true
74 | true
75 | true
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
84 |
85 |
86 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/test/msvc10/tut6a/tut6a.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {C781F9C4-31D4-4509-B031-84DB598B207D}
15 | Win32Proj
16 | tut6a
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 |
62 |
63 | Level3
64 |
65 |
66 | MaxSpeed
67 | true
68 | true
69 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
70 |
71 |
72 | Console
73 | true
74 | true
75 | true
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
84 |
85 |
86 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/test/msvc10/tut6b/tut6b.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {4A77CA6A-8E72-4CC6-9FE7-2C555C51815C}
15 | Win32Proj
16 | tut6b
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 |
62 |
63 | Level3
64 |
65 |
66 | MaxSpeed
67 | true
68 | true
69 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
70 |
71 |
72 | Console
73 | true
74 | true
75 | true
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
84 |
85 |
86 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/test/msvc10/tut6c/tut6c.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {17C6DD1B-EF6F-4561-B4FF-CF39F975ED29}
15 | Win32Proj
16 | tut6c
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 |
62 |
63 | Level3
64 |
65 |
66 | MaxSpeed
67 | true
68 | true
69 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
70 |
71 |
72 | Console
73 | true
74 | true
75 | true
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
84 |
85 |
86 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/test/msvc10/windows_attributes/windows_attributes.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {FC5C770F-3017-4021-8DAF-C5DCA3FDF005}
15 | Win32Proj
16 | windows_attributes
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | true
44 |
45 |
46 | false
47 |
48 |
49 |
50 |
51 |
52 | Level3
53 | Disabled
54 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
55 |
56 |
57 | Console
58 | true
59 |
60 |
61 |
62 |
63 | Level3
64 |
65 |
66 | MaxSpeed
67 | true
68 | true
69 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
70 |
71 |
72 | Console
73 | true
74 | true
75 | true
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | {0ea788ca-fa52-4290-a4d0-f616390b203b}
84 |
85 |
86 | {ffd738f7-96f0-445c-81ea-551665ef53d1}
87 |
88 |
89 | {f94ccadd-a90b-480c-a304-c19d015d36b1}
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/test/sample_test.cpp:
--------------------------------------------------------------------------------
1 | // filesystem sample_test.cpp ----------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2012
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // --------------------------------------------------------------------------//
9 | //
10 | // This program provides a template for bug reporting test cases.
11 | //
12 | // --------------------------------------------------------------------------//
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #ifndef BOOST_LIGHTWEIGHT_MAIN
21 | # include
22 | #else
23 | # include
24 | #endif
25 |
26 | namespace fs = boost::filesystem;
27 | using fs::path;
28 | using std::cout;
29 | using std::endl;
30 | using std::string;
31 | using std::wstring;
32 |
33 | namespace
34 | {
35 | bool cleanup = true;
36 | }
37 |
38 | // cpp_main ----------------------------------------------------------------//
39 |
40 | int cpp_main(int argc, char* argv[])
41 | {
42 | if (argc > 1 && std::strcmp(argv[1], "--no-cleanup") == 0)
43 | cleanup = false;
44 |
45 | // Test cases go after this block of comments
46 | // Use test case macros from boost/detail/lightweight_test.hpp:
47 | //
48 | // BOOST_TEST(predicate); // test passes if predicate evaluates to true
49 | // BOOST_TEST_EQ(x, y); // test passes if x == y
50 | // BOOST_TEST_NE(x, y); // test passes if x != y
51 | // BOOST_ERROR(msg); // test fails, outputs msg
52 | // Examples:
53 | // BOOST_TEST(path("f00").size() == 3); // test passes
54 | // BOOST_TEST_EQ(path("f00").size(), 3); // test passes
55 | // BOOST_MSG("Oops!"); // test fails, outputs "Oops!"
56 |
57 | if (cleanup)
58 | {
59 | // Remove any test files or directories here
60 | }
61 |
62 | return ::boost::report_errors();
63 | }
64 |
--------------------------------------------------------------------------------
/test/test_codecvt.hpp:
--------------------------------------------------------------------------------
1 | // test_codecvt.hpp ------------------------------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2009, 2010
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // Library home page: http://www.boost.org/libs/filesystem
9 |
10 | #ifndef BOOST_FILESYSTEM3_TEST_CODECVT_HPP
11 | #define BOOST_FILESYSTEM3_TEST_CODECVT_HPP
12 |
13 | #include
14 | #include
15 | #include // for mbstate_t
16 |
17 | //------------------------------------------------------------------------------------//
18 | // //
19 | // class test_codecvt //
20 | // //
21 | // Warning: partial implementation; even do_in and do_out only partially meet the //
22 | // standard library specifications as the "to" buffer must hold the entire result. //
23 | // //
24 | // The value of a wide character is the value of the corresponding narrow character //
25 | // plus 1. This ensures that compares against expected values will fail if the //
26 | // code conversion did not occur as expected. //
27 | // //
28 | //------------------------------------------------------------------------------------//
29 |
30 | class test_codecvt
31 | : public std::codecvt< wchar_t, char, std::mbstate_t >
32 | {
33 | public:
34 | explicit test_codecvt()
35 | : std::codecvt() {}
36 | protected:
37 |
38 | virtual bool do_always_noconv() const throw() { return false; }
39 |
40 | virtual int do_encoding() const throw() { return 0; }
41 |
42 | virtual std::codecvt_base::result do_in(std::mbstate_t&,
43 | const char* from, const char* from_end, const char*& from_next,
44 | wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const
45 | {
46 | for (; from != from_end && to != to_end; ++from, ++to)
47 | *to = *from + 1;
48 | if (to == to_end)
49 | return error;
50 | *to = L'\0';
51 | from_next = from;
52 | to_next = to;
53 | return ok;
54 | }
55 |
56 | virtual std::codecvt_base::result do_out(std::mbstate_t&,
57 | const wchar_t* from, const wchar_t* from_end, const wchar_t*& from_next,
58 | char* to, char* to_end, char*& to_next) const
59 | {
60 | for (; from != from_end && to != to_end; ++from, ++to)
61 | *to = static_cast(*from - 1);
62 | if (to == to_end)
63 | return error;
64 | *to = '\0';
65 | from_next = from;
66 | to_next = to;
67 | return ok;
68 | }
69 |
70 | virtual std::codecvt_base::result do_unshift(std::mbstate_t&,
71 | char* /*from*/, char* /*to*/, char* & /*next*/) const { return ok; }
72 |
73 | virtual int do_length(std::mbstate_t&,
74 | const char* /*from*/, const char* /*from_end*/, std::size_t /*max*/) const { return 0; }
75 |
76 | virtual int do_max_length() const throw () { return 0; }
77 | };
78 |
79 | #endif // BOOST_FILESYSTEM3_TEST_CODECVT_HPP
80 |
--------------------------------------------------------------------------------
/test/windows_attributes.cpp:
--------------------------------------------------------------------------------
1 | // windows_attributes ----------------------------------------------------------------//
2 |
3 | // Copyright Beman Dawes 2010
4 |
5 | // Distributed under the Boost Software License, Version 1.0.
6 | // See http://www.boost.org/LICENSE_1_0.txt
7 |
8 | // Library home page: http://www.boost.org/libs/filesystem
9 |
10 | //--------------------------------------------------------------------------------------//
11 |
12 | // Useful for debugging status related issues //
13 |
14 | //--------------------------------------------------------------------------------------//
15 |
16 | #include
17 |
18 | #ifndef BOOST_LIGHTWEIGHT_MAIN
19 | # include
20 | #else
21 | # include
22 | #endif
23 |
24 | #include
25 | #include