Function toNativePath

Summary

#include <lib/inc/drogon/utils/Utilities.h>

(1) const std::string & toNativePath(const std::string &strPath)

(2) std::string toNativePath(const std::wstring &strPath)

Function overload

Synopsis

#include <lib/inc/drogon/utils/Utilities.h>

const std::string & toNativePath(const std::string &strPath)

Description

Convert a generic (UTF-8) path with to an OS native path.

This is a helper, mainly for Windows and multi-platform projects.

On Windows, slash directory separators are converted to backslash, and a wide string is returned.

On other OSes, returns an UTF-8 string without altering the directory separators.

Parameters

strPath - Wide string or UTF-8 path.

Returns
An OS path, suitable for use with the OS API.

Source

Lines 251-254 in lib/inc/drogon/utils/Utilities.h.

inline const std::string &toNativePath(const std::string &strPath)
{
    return trantor::utils::toNativePath(strPath);
}

Synopsis

#include <lib/inc/drogon/utils/Utilities.h>

std::string toNativePath(const std::wstring &strPath)

Description

No description yet.

Source

Lines 255-258 in lib/inc/drogon/utils/Utilities.h.

inline std::string toNativePath(const std::wstring &strPath)
{
    return trantor::utils::toNativePath(strPath);
}





Add Discussion as Guest

Log in