#include<iostream>
#include<typeinfo>
#include<Poco/Path.h>
#include <Poco/DirectoryIterator.h>
#include <Poco/URI.h>
using namespace std;
using namespace Poco; int main(){
string s("/media/ygy/YGY");
Path my_path (s);
cout<< Path::current()<<endl; URI uri(s);
cout<<uri.toString()<<endl; uri.setFragment("ygy");
uri.setAuthority("Authority"); uri.setHost("Host");
uri.setPath(s);
//uri.setPathEtc("pathEtc");
uri.setPort();
uri.setQuery("query");
uri.setRawQuery("RawQuery");
uri.setScheme("scheme");
uri.setUserInfo("userInfo");
cout <<uri.getFragment()<<endl;
cout<<uri.getHost()<<endl;
cout<<uri.getPath()<<endl;
cout<<uri.getPathAndQuery()<<endl;
cout<<uri.getPathEtc()<<endl;
cout <<uri.getPort()<<endl;
cout <<uri.getQuery()<<endl;
cout<<uri.getRawQuery()<<endl;
cout <<uri.getScheme()<<endl;
cout<<uri.getUserInfo()<<endl;
cout<<"------"<<endl;
cout<<uri.toString()<<endl;
} root@goodjob:~/work/poco/path# ./test
/home/ygy/work/poco/path/
/media/ygy/YGY
ygy
Host
/media/ygy/YGY
/media/ygy/YGY?RawQuery
/media/ygy/YGY?RawQuery#ygy
80
RawQuery
RawQuery
scheme
userInfo
------
scheme://userInfo@Host:80/media/ygy/YGY?RawQuery#ygy

Poco::URI的更多相关文章

  1. c++ poco库https调用

    #include "Poco\File.h"#include "Poco\FileStream.h"#include "Poco\Process.h& ...

  2. Poco C++——HTTP的post请求和get请求

    两种请求都需要包含头文件: #include <iostream> #include <string> #include "Poco/Net/HTTPClientSe ...

  3. Poco之ftp目录切换与创建

    TEMPLATE = app QT += qml quick widgets#LIBS += -lPocoFoundation -lPocoXML -lPocoNetSOURCES += main.c ...

  4. [poco] HttpRequest之post方法

    转自 http://www.cnblogs.com/yuanxiaoping_21cn_com/archive/2012/06/10/2544032.html #import <iostream ...

  5. 【转】Poco 1.4.2 HTTPClientSession/HTTPRequest 使用使用代理(proxy)需要注意的一点

    Poco 1.4.2 HTTPClientSession/HTTPClientSession 在使用代理的时候,request的URI不能包含协议和主机.否则会出错. 不使用代理的时候,以下代码能正常 ...

  6. 使用POCO发送HTTP(S)请求

    POCO GitHub地址https://github.com/pocoproject/poco http_example.cpp #include <iostream> #include ...

  7. MongoDB地理空间数据存储及检索

    目录 1.存入地理数据 GeoJSON数据存入 1.Ponit 点数据 2.LineString 线数据(多段线) 3. Polygon 多边形数据 4.MultiPoint多点.MultiLineS ...

  8. android开发-c++代码调用so库

    Android项目的CMakeLists.txt代码如下,so文件放在项目的$Project/app/src/main/jniLibs/$arch下,$arch替换为arm64-v8a armv7a等 ...

  9. C++写动态站点之HelloWorld!

    演示样例源码下载地址:Fetch_Platform.7z 更复杂的代码可參考本博客BBS的实现 简单的说.动态站点就是能够动态变更的站点.动态变化的内容通常来自后端数据库.例如以下省略万字(动态站点) ...

随机推荐

  1. ortp代码简析

    ortp初始化 /** *    Initialize the oRTP library. You should call this function first before using *     ...

  2. Unity初探—SpaceShoot

    Unity初探—SpaceShoot DestroyByBoundary脚本(C#) 在游戏中我们添加了一个Cube正方体,让他来作为游戏的边界.它是可以触发触发事件的(勾选Is Trigger),当 ...

  3. python selenium 使用htmlunit 执行测试。非图形界面浏览器。

    其实就是换个浏览器,只是这个浏览器没有图形界面而已. browser = webdriver.Chrome() 换成 browser = webdriver.Remote(desired_capabi ...

  4. Laxcus大数据管理系统2.0(6)- 第四章 数据计算

    第四章 数据计算 Laxcus所有数据计算工作都是通过网络实施.相较于集中计算,在网络间进行的数据计算更适合处理那些数据量大.复杂的.耗时长的计算任务.能够实施网络计算的前提是数据可以被分割,就是把一 ...

  5. 对int类型最小值INT_MIN取负值结果不变

    在32位系统中,int类型的最大值是0x7fffffff(即除了最高的1Bit其他31位都为1),而最小值是0x80000000(除了最高1bit,其他31位都为0). 显然,对于最小值求负数是不存在 ...

  6. 通过Ajax上传文件至WebApi服务器

    https://stackoverflow.com/questions/43013858/ajax-post-a-file-from-a-form-with-axios var formData = ...

  7. .net转PHP从零开始-环境的搭建

    PHP初级开发环境安装很简单,只需要使用一键安装的phpstudy 下载地址:http://www.phpstudy.net/ 安装后可以看到 这样的界面,设置好相关的配置,然后,选择查看phpinf ...

  8. Prime Matrix(暴力出奇迹)

    Description You've got an n × m matrix. The matrix consists of integers. In one move, you can apply ...

  9. tabales1.10版参数详解

    //@translator codepiano //@blog codepiano //@email codepiano.li@gmail.com //尝试着翻译了一下,难免有错误的地方,欢迎发邮件告 ...

  10. 201621044079 week13 网络

    作业13-网络 1. 本周学习总结 以你喜欢的方式(思维导图.OneNote或其他)归纳总结多网络相关内容. 2. 为你的系统增加网络功能(购物车.图书馆管理.斗地主等)-分组完成 为了让你的系统可以 ...