GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - CatInCosmicSpace/webdav-client-cpp: :cloud: WebDAV Client provides easy and convenient to work with WebDAV-servers.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

544 Commits
544 Commits

Folders and files

NameName
Last commit message
Last commit date
cmake
cmake
 
 
docs
docs
 
 
examples/client
examples/client
 
 
fixtures/upload
fixtures/upload
 
 
include/webdav
include/webdav
 
 
scripts
scripts
 
 
sources
sources
 
 
tests
tests
 
 
tools
tools
 
 
vendor
vendor
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.travis.yml
.travis.yml
 
 
AUTHORS
AUTHORS
 
 
BUGS.md
BUGS.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CPackConfig.cmake
CPackConfig.cmake
 
 
ChangeLog.md
ChangeLog.md
 
 
DESCRIPTION
DESCRIPTION
 
 
INSTALL.UNIX.md
INSTALL.UNIX.md
 
 
INSTALL.WIN.md
INSTALL.WIN.md
 
 
INSTALL.macOS.md
INSTALL.macOS.md
 
 
LICENSE
LICENSE
 
 
MANIFEST.md
MANIFEST.md
 
 
NEWS
NEWS
 
 
README.md
README.md
 
 
REQUIREMENTS.UNIX.txt
REQUIREMENTS.UNIX.txt
 
 
TODO.md
TODO.md
 
 
appveyor.yml
appveyor.yml
 
 

Repository files navigation

WebDAV Client

version Gitter Build Status Build status

=== My client-server tests: Build Status

Package WebDAV Client provides easy and convenient to work with WebDAV-servers:

  • Yandex.Disk
  • Dropbox
  • Google Drive
  • Box
  • 4shared
  • ...

Requirements

  • curl >= 7.38.0
  • openssl >= 1.0.1f
  • pugixml >= 1.0.0

Install

For Windows see INSTALL.WIN.md file.

Building requirements

For *-nix or macOS you can build the requirements with package manager or from sources.

If you want to build the requirements from sources then see INSTALL.UNIX.md and INSTALL.macOS.md respectively.

If you want to use package manager then input:

# Debian or Ubuntu
$ sudo apt-get install libssl-dev libcurl4-openssl-dev libpugixml-dev

# Fedora
$ sudo dnf install openssl-devel curl-devel pugixml-devel

# macOS
$ brew install curl pugixml

Building WebDAV Client

$ git clone https://github.com/designerror/webdav-client-cpp
$ cd webdav-client-cpp
$ mkdir build && cd build
# The next line is needed for building on macOS
$ export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/
$ cmake .. && make
$ make install

Documentation

$ cd docs
$ doxygen doxygen.conf
$ firefox html/index.html

Usage examples

#include <iostream>
#include <memory>
#include <webdav/client.hpp>

int main()
{
  std::map<std::string, std::string> options =
  {
      {"webdav_hostname", "https://webdav.yandex.ru"},
      {"webdav_login",    "webdav_login"},
      {"webdav_password", "webdav_password"}
  };
  // additional keys: 
  // - webdav_root
  // - cert_path, key_path
  // - proxy_hostname, proxy_login, proxy_password
            
  std::shared_ptr<WebDAV::Client> client(WebDAV::Client::Init(options));
  
  auto check_connection = client->check();
  std::cout << "test connection with WebDAV drive is " 
            << (check_connection ? "" : "not ")
            << "successful"<< std::endl;
  
  auto is_directory = client->is_dir("/path/to/remote/resource");
  std::cout << "remote resource is " 
            << (is_directory ? "" : "not ") 
            << "directory" << std::endl;
  
  client->create_directory("/path/to/remote/directory/");
  client->clean("/path/to/remote/directory/");
  
  std::cout << "On WebDAV-disk available free space: " 
            << client->free_size() 
            << std::endl;
  
  std::cout << "remote_directory_name";
  for(auto& resource_name : client->list("/path/to/remote/directory/"))
  {
      std::cout << "\t" << "-" << resource_name;
  }
  std::cout << std::endl;
  
  client->download("/path/to/remote/file", "/path/to/local/file");
  client->clean("/path/to/remote/file");
  client->upload("/path/to/remote/file", "/path/to/local/file");
  
  auto meta_info = client->info("/path/to/remote/resource");
  for(auto& field : meta_info)
  {
      std::cout << field.first << ":" << "\t" << field.second;
  }
  std::cout << std::endl;

  client->copy("/path/to/remote/file1", "/path/to/remote/file2");
  client->move("/path/to/remote/file1", "/path/to/remote/file3");
  
  client->async_upload("/path/to/remote/file", "/path/to/local/file");
  client->async_download("/path/to/remote/file", "/path/to/local/file");
}

Soon

# via apt
$ sudo apt install libwdc-dev

# via dnf
$ sudo dnf install wdc-devel

# via yum
$ yum install wdc

Until

# via homebrew or linuxbrew
$ brew install wdc

About

☁️ WebDAV Client provides easy and convenient to work with WebDAV-servers.

designerror.github.io/webdav-client-cpp

Resources

Readme
License
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.