mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
add io::path.normalized()
This commit is contained in:
parent
1ec8f89599
commit
59f46ad530
5 changed files with 39 additions and 35 deletions
|
|
@ -1,9 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <filesystem>
|
||||
|
||||
namespace io {
|
||||
class access_error : public std::runtime_error {
|
||||
public:
|
||||
access_error(const std::string& msg) : std::runtime_error(msg) {
|
||||
}
|
||||
};
|
||||
|
||||
/// @brief std::filesystem::path project-specific alternative having
|
||||
/// `entry_point:path` scheme and solving std::filesystem::path problems:
|
||||
/// - implicit std::string conversions depending on compiler
|
||||
|
|
@ -115,6 +122,8 @@ namespace io {
|
|||
return str.substr(0, slashpos);
|
||||
}
|
||||
|
||||
path normalized() const;
|
||||
|
||||
std::string string() const {
|
||||
return str;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue