inline std::string host(const uri &uri_) { return uri_.host(); }
inline std::string user_info(const uri &uri_) { return uri_.user_info(); }
inline std::string scheme(const uri &uri_) { return uri_.scheme(); }
unix_streambuf::unix_streambuf( std::ios_base::openmode m, const uri &path, std::streamsize bufSz ) : streambuf( m, bufSz ), _path( path.full_path() ) { stash_uri( path.pretty() ); initFD( m ); }
void operator () (uri &uri_) const { std::string encoded_path; encode(path, std::back_inserter(encoded_path)); uri_.append(encoded_path); }
void swap(uri &other) { boost::swap(uri_, other.uri_); other.parse(); boost::swap(is_valid_, other.is_valid_); }