26 Commits

Author SHA1 Message Date
Andrey Semashev
29ef7d683d Reverted using std::filesystem::path to pass paths to file streams.
This doesn't compile with gcc 8 on MinGW-w64, and fails in runtime with
gcc 10.2 and clang 8.0.1 on Cygwin64 because character code conversion errors,
so basically std::filesystem never works with wide paths on Windows.

We still use wide paths as `const wchar_t*` with libc++ though.

Also, changed BOOST_FILESYSTEM_C_STR definition to accept the path as
an argument and use that definition in the tests rather than duplicating it.

Related to https://github.com/boostorg/filesystem/issues/181.
2021-06-09 18:28:28 +03:00
Andrey Semashev
915a5739be Made wide character concatenation more explicit. 2021-06-09 15:23:57 +03:00
Andrey Semashev
4b84226783 Refactored path implementation for better support Windows path prefixes.
- Unified root name and root directory parsing that was scattered and
  duplicated across different algorithms. The new implementation is
  consolidated in a single function for parsing root name and root
  directory, which is used from various algorithms.

- The new root name parsing now supports Windows local device ("\\.\")
  and NT path ("\??\") prefixes. It also adds support for filesystem
  ("\\?\") prefix to some of the higher level algorithms that were
  using custom parsing previously. Tests updated to verify these prefixes.

- Some of the path decomposition methods were unified with presence checking
  methods (e.g. root_name with has_root_name). This makes these methods
  work consistently and also makes the has_* methods less expensive as
  they no longer have to construct a path only to check if it is empty.

- The filename accessor no longer returns root name if the whole path
  only consists of a root name. This also affects stem and extension as
  those accessors are based on filename. This is a breaking change.

- Cleaned up code:
  - Removed redundant checks for std::wstring support.
  - Added header/footer headers to globally disable compiler warnings.
  - Removed commented out super-deprecated code.
  - Added missing includes and removed includes that are not needed.
  - Nonessential code formatting.
2021-06-05 19:52:33 +03:00
Andrey Semashev
c03249c375 Reformatted code for more consistent look and better readability. 2021-04-24 22:37:57 +03:00
Andrey Semashev
0fcfd93407 Updated lightweight_test.hpp includes to the new location. 2020-03-04 00:49:27 +03:00
Andrey Semashev
e268f557df Trim trailing spaces in the tests. 2018-11-24 15:23:43 +03:00
Beman Dawes
794a99390f filesystem: Remove universal-character-name from source; was causing failure with Intel/Windows and required warning suppression on VC++
[SVN r78009]
2012-04-16 14:06:50 +00:00
Beman Dawes
7941871477 Filesystem - Delete v3 directories no longer needed. Cleanup links, namespaces, and other residue from dual v2/v3 support.
[SVN r77555]
2012-03-26 12:44:24 +00:00
Beman Dawes
16099b4c7d Filesystem - Move V3 files and directories into place
[SVN r77554]
2012-03-26 12:31:06 +00:00
Beman Dawes
fa515c07f5 Move files into new v2 + v3 directory structure
[SVN r62653]
2010-06-09 13:00:15 +00:00
Beman Dawes
0645bc1347 System, Filesystem: remove boost/detail/test_framework.hpp; use boost/detail/lightweight_test.hpp instead (Thanks to Peter Dimov for pointing this out)
[SVN r51966]
2009-03-25 12:11:47 +00:00
Beman Dawes
ae30e53a68 Filesystem: remove dependency on Boost.Test
[SVN r51959]
2009-03-24 15:33:31 +00:00
Beman Dawes
e22eb55f69 Boost.Filesystem: change tests to define BOOST_FILESYSTEM_NO_DEPRECATED. Expand deprecated_test.
[SVN r48463]
2008-08-29 20:10:08 +00:00
Beman Dawes
fb65347b54 After extensive discussion on the list with Dave Abrahams, Vladimir Prus, and others, rename basic_path::leaf() -> filename, branch_path -> parent_path, replace_leaf -> replace_filename. Add basic_path member functions stem, extension, replace_extension.
[SVN r47181]
2008-07-07 12:20:04 +00:00
Beman Dawes
85509b2357 Fix ticket #1609
[SVN r45829]
2008-05-27 19:59:10 +00:00
John Maddock
d6a16ca075 Fix msvc warnings using new warning suppression header.
[SVN r44688]
2008-04-21 08:47:04 +00:00
Beman Dawes
24d5955d88 Remove files after tests
[SVN r39365]
2007-09-18 15:37:36 +00:00
Beman Dawes
e9a59fcd78 Reactivate the 4.1 test. The correct fix was to fix underlying fstream .hpp narrow_path code, not disable the test.
[SVN r33215]
2006-03-03 16:28:36 +00:00
Beman Dawes
9f2f72b451 no test 4.1 on older Dinkumware since it asserts on empty path, causing logic to fail
[SVN r33160]
2006-02-27 21:50:14 +00:00
Beman Dawes
7bd0367847 Added test case for case of no directory
[SVN r33041]
2006-02-20 21:32:21 +00:00
Beman Dawes
48d4335bfc merge from i18n branch - at last!
[SVN r32079]
2005-12-16 16:40:35 +00:00
Stefan Slapeta
4c75d616cf Replaced BOOST_TEST
[SVN r27048]
2005-02-03 10:54:24 +00:00
Beman Dawes
8c8ea6e75b Update copyright and license info
[SVN r20243]
2003-10-02 15:17:36 +00:00
Beman Dawes
3ca5d3daab Change license message to reference Boost Software License
[SVN r20038]
2003-09-12 17:09:29 +00:00
Beman Dawes
fadc0fc63e fs_review branch merged
[SVN r16593]
2002-12-11 19:47:00 +00:00
Beman Dawes
543669496a initial commit - review comments not yet applied
[SVN r15831]
2002-10-09 19:49:35 +00:00