{"id":13514292,"url":"https://github.com/CloudPolis/webdav-client-cpp","last_synced_at":"2025-03-31T03:30:24.194Z","repository":{"id":28258069,"uuid":"31768081","full_name":"CloudPolis/webdav-client-cpp","owner":"CloudPolis","description":":cloud: C++ WebDAV Client provides easy and convenient to work with WebDAV-servers.","archived":false,"fork":false,"pushed_at":"2024-05-01T16:41:02.000Z","size":1645,"stargazers_count":125,"open_issues_count":5,"forks_count":51,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-24T00:29:48.289Z","etag":null,"topics":["box","client","cpp","webdav","yandex-disk"],"latest_commit_sha":null,"homepage":"http://cloudpolis.github.io/webdav-client-cpp/","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CloudPolis.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-06T12:21:11.000Z","updated_at":"2025-03-17T08:12:30.000Z","dependencies_parsed_at":"2024-07-06T01:17:59.249Z","dependency_job_id":null,"html_url":"https://github.com/CloudPolis/webdav-client-cpp","commit_stats":{"total_commits":534,"total_committers":11,"mean_commits":48.54545454545455,"dds":"0.28277153558052437","last_synced_commit":"e6e613dd6842bebbdff354ed5771c34d5566f5b8"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudPolis%2Fwebdav-client-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudPolis%2Fwebdav-client-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudPolis%2Fwebdav-client-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudPolis%2Fwebdav-client-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CloudPolis","download_url":"https://codeload.github.com/CloudPolis/webdav-client-cpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246413377,"owners_count":20773053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["box","client","cpp","webdav","yandex-disk"],"created_at":"2024-08-01T05:00:51.959Z","updated_at":"2025-03-31T03:30:23.415Z","avatar_url":"https://github.com/CloudPolis.png","language":"CMake","readme":"WebDAV Client\n===\n[![version](https://img.shields.io/badge/hunter-v0.23.86-blue.svg)](https://github.com/ruslo/hunter/releases/tag/v0.23.86)\n[![version](https://img.shields.io/badge/wdc-v1.1.5-blue.svg)](https://github.com/CloudPolis/webdav-client-cpp/releases/tag/v1.1.4)\n[![Build Status](https://travis-ci.org/CloudPolis/webdav-client-cpp.svg?branch=master)](https://travis-ci.org/CloudPolis/webdav-client-cpp)\n[![Build status](https://ci.appveyor.com/api/projects/status/cr2xwpwe3iiafbwg?svg=true)](https://ci.appveyor.com/project/rusdevops/webdav-client-cpp)\n[![Join the chat at https://gitter.im/CloudPolis/webdav-client-cpp](https://badges.gitter.im/CloudPolis/webdav-client-cpp.svg)](https://gitter.im/CloudPolis/webdav-client-cpp?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nPackage ```WebDAV Client``` provides easy and convenient to work with WebDAV-servers:\n\n - Yandex.Disk\n - Dropbox\n - Google Drive\n - Box\n - 4shared\n - ownCloud\n - ...\n\nInstall old version\n===\n\n```ShellSession\n# via brew or homebrew\n$ brew install wdc\n```\n\nBuild\n===\n\nBuilding WebDAV Client from sources:\n\n```ShellSession\n$ git clone --recursive https://github.com/CloudPolis/webdav-client-cpp\n$ cd webdav-client-cpp\n$ ./tools/polly/bin/polly --install\n```\n\nBuilding documentation:\n```ShellSession\n$ doxygen docs/doxygen.conf\n$ open docs/html/index.html\n```\n\nRunning tests\n===\n\nFor run tests you need to set environment variables `WEBDAV_HOSTNAME`, \n`WEBDAV_USERNAME` and `WEBDAV_PASSWORD` (optional `WEBDAV_ROOT`).\n\n```ShellSession\n$ export WEBDAV_HOSTNAME=\u003cyour_webdav_hostname\u003e\n$ export WEBDAV_USERNAME=\u003cyour_webdav_username\u003e\n$ export WEBDAV_PASSWORD=\u003cyour_webdav_password\u003e\n$ ./tools/polly/bin/polly --test --reconfig --fwd BUILD_TESTS=yes\n```\n\nUsage\n===\n\n```C++\n#include \u003cwebdav/client.hpp\u003e\n\n#include \u003ciostream\u003e\n#include \u003cmap\u003e\n#include \u003cmemory\u003e\n\nint main()\n{\n  std::map\u003cstd::string, std::string\u003e options =\n  {\n    {\"webdav_hostname\", \"https://webdav.yandex.ru\"},\n    {\"webdav_username\", \"webdav_username\"},\n    {\"webdav_password\", \"webdav_password\"}\n  };\n  // additional keys: \n  // - webdav_root\n  // - cert_path, key_path\n  // - proxy_hostname, proxy_username, proxy_password\n            \n  std::unique_ptr\u003cWebDAV::Client\u003e client{ new WebDAV::Client{ options } };\n  \n  bool check_connection = client-\u003echeck();\n  std::cout \u003c\u003c \"test connection with WebDAV drive is \" \n            \u003c\u003c (check_connection ? \"\" : \"not \")\n            \u003c\u003c \"successful\"\u003c\u003c std::endl;\n  \n  bool is_dir = client-\u003eis_directory(\"/path/to/remote/resource\");\n  std::cout \u003c\u003c \"remote resource is \" \n            \u003c\u003c (is_dir ? \"\" : \"not \") \n            \u003c\u003c \"directory\" \u003c\u003c std::endl;\n  \n  client-\u003ecreate_directory(\"/path/to/remote/directory/\");\n  client-\u003eclean(\"/path/to/remote/directory/\");\n\n  std::cout \u003c\u003c \"On WebDAV-disk available free space: \" \n            \u003c\u003c client-\u003efree_size() \n            \u003c\u003c std::endl;\n  \n  std::cout \u003c\u003c \"remote_directory_name\";\n  for (const auto\u0026 resource_name : client-\u003elist(\"/path/to/remote/directory/\"))\n  {\n    std::cout \u003c\u003c \"\\t\" \u003c\u003c \"-\" \u003c\u003c resource_name;\n  }\n  std::cout \u003c\u003c std::endl;\n  \n  client-\u003edownload(\"/path/to/remote/file\", \"/path/to/local/file\");\n  client-\u003eclean(\"/path/to/remote/file\");\n  client-\u003eupload(\"/path/to/remote/file\", \"/path/to/local/file\");\n\n  const auto meta_info = client-\u003einfo(\"/path/to/remote/resource\");\n  for (const auto\u0026 field : meta_info) {\n    std::cout \u003c\u003c field.first \u003c\u003c \":\" \u003c\u003c \"\\t\" \u003c\u003c field.second;\n  }\n  std::cout \u003c\u003c std::endl;\n\n  client-\u003ecopy(\"/path/to/remote/file1\", \"/path/to/remote/file2\");\n  client-\u003emove(\"/path/to/remote/file1\", \"/path/to/remote/file3\");\n\n  client-\u003easync_upload(\"/path/to/remote/file\", \"/path/to/local/file\");\n  client-\u003easync_download(\"/path/to/remote/file\", \"/path/to/local/file\");\n}\n```\n\n**CMakeLists.txt**\n```cmake\ncmake_minimum_required(VERSION 3.4)\n\nHunterGate(\n  URL \"https://github.com/ruslo/hunter/archive/v0.23.83.tar.gz\"\n  SHA1 \"12dec078717539eb7b03e6d2a17797cba9be9ba9\"\n)\n\nproject(example)\n\nhunter_add_package(WDC)\nfind_package(WDC CONFIG REQUIRED)\n\nadd_executable(example example.cpp)\ntarget_link_libraries(example WDC::libwdc)\n```\n","funding_links":[],"categories":["Libraries"],"sub_categories":["C++"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCloudPolis%2Fwebdav-client-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCloudPolis%2Fwebdav-client-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCloudPolis%2Fwebdav-client-cpp/lists"}