#include <davposix.hpp>
Public Member Functions | |
| DavPosix (Context *handle) | |
| int | stat (const RequestParams *params, const std::string &str, struct stat *st, DavixError **err) |
| stat call behavior similar to the POSIX stat function | |
| DAVIX_DIR * | opendir (const RequestParams *params, const std::string &url, DavixError **err) |
| execute an opendir function with Webdav behavior similar to the POSIX opendir function | |
| dirent * | readdir (DAVIX_DIR *dir, DavixError **err) |
| execute a readdir function with Webdav behavior similar to the POSIX readdir function | |
| int | closedir (DAVIX_DIR *d, DavixError **err) |
| DAVIX_DIR * | opendirpp (const RequestParams *params, const std::string &url, DavixError **err) |
| execute an opendirpp function with Webdav opendirpp/readdirpp/closedirpp function read a directory content with a struct stat associated to each directory entry | |
| dirent * | readdirpp (DAVIX_DIR *dir, struct stat *st, DavixError **err) |
| execute a readdirpp function with Webdav opendirpp and readdirpp function read a directory content with stat information for each directory entry | |
| int | closedirpp (DAVIX_DIR *, DavixError **err) |
| close an existing file handle | |
| int | mkdir (const RequestParams *_params, const std::string &url, mode_t right, DavixError **err) |
| execute a mkdir function with Webdav behavior similar to the POSIX mkdir function | |
| int | unlink (const RequestParams *_params, const std::string &url, DavixError **err) |
| execute a remove file operation behavior similar to the POSIX unlink function | |
| int | rmdir (const RequestParams *_params, const std::string &url, DavixError **err) |
| execute a remove directory operation behavior similar to the POSIX rmdir function | |
| DAVIX_FD * | open (const RequestParams *_params, const std::string &url, int flags, DavixError **err) |
| open a file for read/write operation in a POSIX-like approach behavior similar to the POSIX open function This operation is supported on plain HTTP servers. | |
| ssize_t | read (DAVIX_FD *fd, void *buf, size_t count, DavixError **err) |
| read a file in a POSIX-like approach with HTTP(S) behavior similar to the POSIX read function | |
| ssize_t | pread (DAVIX_FD *fd, void *buf, size_t count, off_t offset, DavixError **err) |
| do a partial read of a file in a POSIX-like approach with HTTP(S) behavior similar to the POSIX pread function | |
| dav_ssize_t | preadVec (DAVIX_FD *fd, const DavIOVecInput *input_vec, DavIOVecOuput *ioutput_vec, dav_size_t count_vec, DavixError **err) |
| pread_vec a file in a POSIX-like approach with HTTP(S) Vector read operation Allow to do several read operations in one single request | |
| ssize_t | write (DAVIX_FD *fd, const void *buf, size_t count, DavixError **err) |
| write a file in a POSIX-like approach with HTTP(S) behavior similar to the POSIX write function | |
| off_t | lseek (DAVIX_FD *fd, off_t offset, int flags, DavixError **err) |
| move the cursor a davix file with HTTP(S) behavior similar to the POSIX lseek function | |
| int | close (DAVIX_FD *fd, DavixError **err) |
| close a existing file descriptor | |
DavPosix offers a POSIX-like API for HTTP/WebDav file operations
POSIX API can be used for convenience when porting application to a POSIX like interface.
DavPosix and all associated method are Thread safe.
| int Davix::DavPosix::close | ( | DAVIX_FD * | fd, | |
| DavixError ** | err | |||
| ) |
close a existing file descriptor
Note : all file descriptors MUST be closed before the destruction of the parent davix context
| fd | : davix file descriptor | |
| count | : number of bytes to write |
| int Davix::DavPosix::closedir | ( | DAVIX_DIR * | d, | |
| DavixError ** | err | |||
| ) |
close an existing file handle
| d | : directory handle to close | |
| err | : Davix error report system |
| off_t Davix::DavPosix::lseek | ( | DAVIX_FD * | fd, | |
| off_t | offset, | |||
| int | flags, | |||
| DavixError ** | err | |||
| ) |
move the cursor a davix file with HTTP(S) behavior similar to the POSIX lseek function
| fd | : davix file descriptor | |
| offset | : offset in byte inside the file | |
| flags | : lseek flags, similar to the lseek function |
| int Davix::DavPosix::mkdir | ( | const RequestParams * | _params, | |
| const std::string & | url, | |||
| mode_t | right, | |||
| DavixError ** | err | |||
| ) |
execute a mkdir function with Webdav behavior similar to the POSIX mkdir function
| params | : request options, can be NULL | |
| url,: | url of the directory to create | |
| right | : default mode of the directory ( ignored for now ) | |
| err | : Davix error report system |
| DAVIX_FD* Davix::DavPosix::open | ( | const RequestParams * | _params, | |
| const std::string & | url, | |||
| int | flags, | |||
| DavixError ** | err | |||
| ) |
open a file for read/write operation in a POSIX-like approach behavior similar to the POSIX open function This operation is supported on plain HTTP servers.
| params | : request options, can be NULL | |
| url | : url of the HTTP file to open | |
| flags | : open flags, similar to the POSIX function open | |
| err,: | Davix Error report |
| DAVIX_DIR* Davix::DavPosix::opendir | ( | const RequestParams * | params, | |
| const std::string & | url, | |||
| DavixError ** | err | |||
| ) |
execute an opendir function with Webdav behavior similar to the POSIX opendir function
| params | : request options, can be NULL | |
| url | : url of the directory to list |
| DAVIX_DIR* Davix::DavPosix::opendirpp | ( | const RequestParams * | params, | |
| const std::string & | url, | |||
| DavixError ** | err | |||
| ) |
execute an opendirpp function with Webdav opendirpp/readdirpp/closedirpp function read a directory content with a struct stat associated to each directory entry
| params | : request options, can be NULL | |
| err | : Davix error report system |
| ssize_t Davix::DavPosix::pread | ( | DAVIX_FD * | fd, | |
| void * | buf, | |||
| size_t | count, | |||
| off_t | offset, | |||
| DavixError ** | err | |||
| ) |
do a partial read of a file in a POSIX-like approach with HTTP(S) behavior similar to the POSIX pread function
| fd | : davix file descriptor | |
| buf | : buffer to fill | |
| count | : maximum number of bytes to read | |
| offset | : offset to use | |
| err,: | Davix Error report |
| dav_ssize_t Davix::DavPosix::preadVec | ( | DAVIX_FD * | fd, | |
| const DavIOVecInput * | input_vec, | |||
| DavIOVecOuput * | ioutput_vec, | |||
| dav_size_t | count_vec, | |||
| DavixError ** | err | |||
| ) |
pread_vec a file in a POSIX-like approach with HTTP(S) Vector read operation Allow to do several read operations in one single request
| fd | : davix file descriptor | |
| input_vec | : input vectors, parameters | |
| output_vec | : output vectors, results | |
| count_vec | : number of vector struct | |
| err,: | Davix Error report |
| ssize_t Davix::DavPosix::read | ( | DAVIX_FD * | fd, | |
| void * | buf, | |||
| size_t | count, | |||
| DavixError ** | err | |||
| ) |
read a file in a POSIX-like approach with HTTP(S) behavior similar to the POSIX read function
| fd | : davix file descriptor | |
| buf | : buffer to fill | |
| count | : maximum number of bytes to read | |
| err,: | Davix Error report |
| struct dirent* Davix::DavPosix::readdir | ( | DAVIX_DIR * | dir, | |
| DavixError ** | err | |||
| ) |
execute a readdir function with Webdav behavior similar to the POSIX readdir function
| params | : request options, can be NULL | |
| dir | : directory handle | |
| err,: | Davix Error report |
| struct dirent* Davix::DavPosix::readdirpp | ( | DAVIX_DIR * | dir, | |
| struct stat * | st, | |||
| DavixError ** | err | |||
| ) |
execute a readdirpp function with Webdav opendirpp and readdirpp function read a directory content with stat information for each directory entry
| params | : request options, can be NULL | |
| dir | : directory handle | |
| stat | struct to fill | |
| err,: | Davix Error report |
| int Davix::DavPosix::rmdir | ( | const RequestParams * | _params, | |
| const std::string & | url, | |||
| DavixError ** | err | |||
| ) |
execute a remove directory operation behavior similar to the POSIX rmdir function
| params | : request options, can be NULL | |
| url,: | directory to delete | |
| err | : Davix error report system |
| int Davix::DavPosix::stat | ( | const RequestParams * | params, | |
| const std::string & | str, | |||
| struct stat * | st, | |||
| DavixError ** | err | |||
| ) |
stat call behavior similar to the POSIX stat function
| params | : request options, can be NULL | |
| str,: | string url | |
| stat | : stat struct to fill |
| int Davix::DavPosix::unlink | ( | const RequestParams * | _params, | |
| const std::string & | url, | |||
| DavixError ** | err | |||
| ) |
execute a remove file operation behavior similar to the POSIX unlink function
| params | : request options, can be NULL | |
| url,: | file to delete | |
| err | : Davix error report system |
| ssize_t Davix::DavPosix::write | ( | DAVIX_FD * | fd, | |
| const void * | buf, | |||
| size_t | count, | |||
| DavixError ** | err | |||
| ) |
write a file in a POSIX-like approach with HTTP(S) behavior similar to the POSIX write function
| fd | : davix file descriptor | |
| buf | : buffer with the write content | |
| count | : number of bytes to write |
1.4.7