Roxen.git / server / etc / test / tests / http / RoxenTest_webdav.pike

version» Context lines:

Roxen.git/server/etc/test/tests/http/RoxenTest_webdav.pike:15:   Standards.URI base_uri;      // Current http client connection.   Protocols.HTTP.Query con;      // Common HTTP headers to send for all HTTP requests.   mapping(string:string) base_headers;      mapping(string:string) current_locks;    + int filesystem_check_exists(string path) + { +  string real_path = Stdio.append_path(real_dir, path); +  return Stdio.is_file(real_path); + }    - int filesystem_check_content(string path, string data) + string filesystem_read_file(string path)   {    string real_path = Stdio.append_path(real_dir, path); -  string real_data = Stdio.read_bytes(real_path); -  return real_data == data; +  return Stdio.read_bytes(real_path);   }    -  + int filesystem_check_content(string path, string data) + { +  return filesystem_read_file(path) == data; + }    -  + int filesystem_compare_files(string first_path, string other_path) + { +  return filesystem_check_content(other_path, filesystem_read_file(first_path)); + } +  +    array(int|mapping(string:string)|string) webdav_request(string method,    string path,    mapping(string:string)|void extra_headers,    string|void data)   {    mapping(string:string) headers = base_headers + ([]);       if (extra_headers) {    headers += extra_headers;    }