return ret;
}
+ std::string Pathname::showRoot( const Pathname & root_r, const Pathname & path_r )
+ {
+ return str::Str() << "(" << root_r << ")" << path_r;
+ }
+
+ std::string Pathname::showRootIf( const Pathname & root_r, const Pathname & path_r )
+ {
+ if ( root_r.empty() || root_r == "/" )
+ return path_r.asString();
+ return showRoot( root_r, path_r );
+ }
+
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Pathname::extension
const std::string & asString() const
{ return name_t; }
+ /** String representation as "(root)/path" */
+ static std::string showRoot( const Pathname & root_r, const Pathname & path_r );
+
+ /** String representation as "(root)/path", unless \a root is \c "/" or empty. */
+ static std::string showRootIf( const Pathname & root_r, const Pathname & path_r );
+
/** Url representation using \c dir schema. */
Url asUrl() const;