diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/AllocatedPath.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fs/AllocatedPath.hxx b/src/fs/AllocatedPath.hxx index 94da284c8..502f30d17 100644 --- a/src/fs/AllocatedPath.hxx +++ b/src/fs/AllocatedPath.hxx @@ -54,6 +54,8 @@ class AllocatedPath { AllocatedPath(const_pointer _value):value(_value) {} + AllocatedPath(string &&_value):value(_value) {} + public: /** * Copy a #AllocatedPath object. @@ -115,6 +117,15 @@ public: } /** + * Convert a C++ string that is already in the filesystem + * character set to a #Path instance. + */ + gcc_pure + static AllocatedPath FromFS(string &&fs) { + return AllocatedPath(std::move(fs)); + } + + /** * Convert a UTF-8 C string to a #AllocatedPath instance. * Returns return a "nulled" instance on error. */ |