Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path::string() method, which have unsafe and unpredictable behavior on Windows (see implementation note in PathToString for details)
Synopsis
Declared in <util/fs.h>
class path
: public std::filesystem::path
Base Classes
Name |
Description |
|
Types
Name |
Type Aliases
Enums
Name |
Member Functions
Name |
Description |
|
Constructors |
Assignment operators |
|
|
|
Addition assignment operators |
|
Division assignment operators |
|
|
|
Deleted to forbid std::string conversion, which encodes locale‐dependently on Windows. |
|
Return a UTF‐8 representation of the path as a std::string, for compatibility with code using std::string. For code using the newer std::u8string type, it is more efficient to call the inherited std::filesystem::path::u8string method instead. |
|
|
Deleted to forbid implicit string_type conversion, whose type varies by platform and breaks portability. |
Static Data Members
Using Declarations
Name |
Description |
Inherit the std::filesystem::path constructors. |
Non-Member Functions
Name |
Description |
Deleted catch‐all overload that forbids unsafe path concatenation via operator+. |
|
Deleted catch‐all overload that forbids unsafe path append operations via operator/. |
|
Most paths passed as configuration arguments are treated as relative to the datadir if they are not absolute. |
|
Path of the block policy fee estimator data file. |
|
Check that a directory has enough free space for an additional write. |
|
Read and check asmap from provided binary file. |
|
Sync directory contents. This is required on some environments to ensure that newly created files are committed to disk. |
|
Dump the anchor IP address database (anchors.dat) |
|
Get the default data directory for the current platform and user. |
|
Check if a directory is writable by creating a temporary file on it. |
|
Path of the mempool policy estimator data file. |
|
Read the anchor IP address database (anchors.dat) |
|
Read full contents of a file and return them in a std::string. |
|
Rename src to dest. |
|
Create a directory and any missing parent directories. |
|
Release a directory lock previously taken with LockDirectory. |
|
Write contents of std::string to a file. |
|
Read settings file. |
|
Write settings file. |
|
Helper function for joining two paths |
|
Open a file, handling path encoding correctly across platforms. |
|
Return a path to the snapshot‐based chainstate dir, if one exists. |
|
Return the on‐disk path used to load and save the persisted mempool. |
|
Read the blockhash of the snapshot base block that was used to construct the chainstate. |
|
Return path to current executable assuming it was invoked with argv0. If path could not be determined, returns an empty path. |
|
Acquire an exclusive lock on a directory via a lock file. |
|
Returns the path to the Berkeley DB data file for a wallet path. |
|
Get the path of the wallet directory. |
|
Determine the path that the wallet is stored in |
|
Returns whether the file at the path is a Berkeley DB file. |
|
Returns whether the file at the path is a SQLite file. |
|
Recursively list database paths in directory. |
|
Return object giving access to Berkeley Read Only database at specified path. |
|
Creates or opens a wallet database at the given path. |
|
Open or create a SQLite wallet database at the given path. |
|
Returns the path to the SQLite data file for a wallet path. |
Created with MrDocs