Path: add FromUTF8() overload that returns an Error

This commit is contained in:
Max Kellermann
2013-09-12 10:02:11 +02:00
parent bf4ee48efa
commit 1ee6a78cb7
4 changed files with 26 additions and 8 deletions

View File

@@ -44,6 +44,8 @@
# endif
#endif
class Error;
extern const class Domain path_domain;
/**
@@ -151,6 +153,9 @@ public:
gcc_pure
static Path FromUTF8(const char *path_utf8);
gcc_pure
static Path FromUTF8(const char *path_utf8, Error &error);
/**
* Convert the path to UTF-8.
* Returns empty string on error or if #path_fs is null pointer.