From 96413b16046f2edbb53ab7abcca73809f6cb3a54 Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Tue, 3 Dec 2013 13:46:05 +0600 Subject: fs/Traits.hxx: implement BuildFS() method --- src/fs/Traits.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/fs/Traits.hxx') diff --git a/src/fs/Traits.hxx b/src/fs/Traits.hxx index c72f9814a..4eb0f24b9 100644 --- a/src/fs/Traits.hxx +++ b/src/fs/Traits.hxx @@ -86,6 +86,16 @@ struct PathTraits { return strlen(p); } + /** + * Constructs the path from the given components. + * If either of the components is empty string, + * remaining component is returned unchanged. + * If both components are empty strings, empty string is returned. + */ + gcc_pure gcc_nonnull_all + static string BuildFS(const_pointer a, size_t a_size, + const_pointer b, size_t b_size); + /** * Determine the "base" file name of the given UTF-8 path. * The return value points inside the given string. -- cgit v1.2.3