13be292018-02-21Karl Gustav Sterneberg inherit "etc/test/tests/http/WebdavTestBase.pike";
ad307f2018-02-16Henrik Grubbström (Grubba)  string filesystem_dir = "$VARDIR/testsuite/webdav/testdir"; // Expanded filesystem_dir. string real_dir;
30c5062018-02-16Henrik Grubbström (Grubba) int filesystem_check_exists(string path) { string real_path = Stdio.append_path(real_dir, path); return Stdio.is_file(real_path); }
ad307f2018-02-16Henrik Grubbström (Grubba) 
30c5062018-02-16Henrik Grubbström (Grubba) string filesystem_read_file(string path)
ad307f2018-02-16Henrik Grubbström (Grubba) { string real_path = Stdio.append_path(real_dir, path);
30c5062018-02-16Henrik Grubbström (Grubba)  return Stdio.read_bytes(real_path); }
ad307f2018-02-16Henrik Grubbström (Grubba) void setup() { real_dir = roxen_path(filesystem_dir); report_debug("Webdav real_dir: %O\n", real_dir); Stdio.mkdirhier(real_dir); }