bit7z
4.1.0
A C++ library for interfacing with the 7-zip shared libs.
Toggle main menu visibility
Loading...
Searching...
No Matches
bitfs.hpp
1
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
2
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
3
4
/*
5
* bit7z - A C++ static library to interface with the 7-zip shared libraries.
6
* Copyright (c) Riccardo Ostani - All Rights Reserved.
7
*
8
* This Source Code Form is subject to the terms of the Mozilla Public
9
* License, v. 2.0. If a copy of the MPL was not distributed with this
10
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
11
*/
12
13
#ifndef BITFS_HPP
14
#define BITFS_HPP
15
16
/* Header for forward declaring fs namespace. */
17
18
#include "bitdefines.hpp"
/* For BIT7Z_USE_STANDARD_FILESYSTEM. */
19
20
#ifdef BIT7Z_USE_STANDARD_FILESYSTEM
21
#include <filesystem>
22
#else
23
/* Notes: we use this forward declaration to avoid including private headers (e.g., fs.hpp).
24
* Since some public API headers include bitgenericitem.hpp (e.g., "bitoutputarchive.hpp"),
25
* including private headers here would result in the "leaking" out of these latter in the public API.*/
26
namespace
ghc {
27
namespace
filesystem {
28
class
path;
29
class
directory_entry;
30
}
// namespace filesystem
31
}
// namespace ghc
32
#endif
33
34
/* Note: bit7zfs is a top-level namespace alias, deliberately NOT nested inside bit7z.
35
* If it were a member of bit7z (e.g., bit7z::fs), a `using namespace bit7z;` directive
36
* would introduce it into the user's scope, clashing with any `fs`/filesystem namespace
37
* the user already has (e.g., `namespace fs = std::filesystem;`). As a sibling namespace,
38
* it is never pulled in by `using namespace bit7z;`, so no such ambiguity can arise. */
39
#ifdef BIT7Z_USE_STANDARD_FILESYSTEM
40
namespace
bit7zfs = std::filesystem;
41
#else
42
namespace
bit7zfs = ghc::filesystem;
43
#endif
44
45
#endif
//BITFS_HPP
include
bit7z
bitfs.hpp
Generated by
1.17.0