mirror of
https://github.com/boostorg/filesystem.git
synced 2025-05-12 05:31:49 +00:00
- 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.
37 lines
1.5 KiB
C++
37 lines
1.5 KiB
C++
// Boost large_file_support_test.cpp ---------------------------------------//
|
|
|
|
// 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 library home page at http://www.boost.org/libs/filesystem
|
|
|
|
// See deprecated_test for tests of deprecated features
|
|
#define BOOST_FILESYSTEM_NO_DEPRECATED
|
|
#define BOOST_SYSTEM_NO_DEPRECATED
|
|
|
|
#include <boost/filesystem/operations.hpp>
|
|
#include <iostream>
|
|
|
|
namespace fs = boost::filesystem;
|
|
|
|
int main()
|
|
{
|
|
if (fs::detail::possible_large_file_size_support())
|
|
{
|
|
std::cout << "It appears that file sizes greater that 2 gigabytes are possible\n"
|
|
"for this configuration on this platform since the operating system\n"
|
|
"does use a large enough integer type to report large file sizes.\n\n"
|
|
"Whether or not such support is actually present depends on the OS\n";
|
|
return 0;
|
|
}
|
|
std::cout << "The operating system is using an integer type to report file sizes\n"
|
|
"that can not represent file sizes greater that 2 gigabytes (31-bits).\n"
|
|
"Thus the Filesystem Library will not correctly deal with such large\n"
|
|
"files. If you think that this operatiing system should be able to\n"
|
|
"support large files, please report the problem to the Boost developers\n"
|
|
"mailing list.\n";
|
|
return 1;
|
|
}
|