mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
Poco::URI: added new constructor to create URI from Path
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include "Poco/Path.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@@ -125,6 +126,16 @@ URI::URI(const URI& baseURI, const std::string& relativeURI):
|
||||
}
|
||||
|
||||
|
||||
URI::URI(const Path& path):
|
||||
_scheme("file"),
|
||||
_port(0)
|
||||
{
|
||||
Path absolutePath(path);
|
||||
absolutePath.makeAbsolute();
|
||||
_path = absolutePath.toString(Path::PATH_UNIX);
|
||||
}
|
||||
|
||||
|
||||
URI::~URI()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user