MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / fromCredentials

Method fromCredentials

packages/filesystem/webdav/webdav.ts:33–43  ·  view source on GitHub ↗
(url: string, options: WebDAVClientOptions)

Source from the content-addressed store, hash-verified

31 basePath: string = "/";
32
33 static fromCredentials(url: string, options: WebDAVClientOptions) {
34 initWebDAVPatch();
35 options = {
36 ...options,
37 headers: {
38 "X-Requested-With": "XMLHttpRequest", // Nextcloud 等需要
39 // "requesttoken": csrfToken, // 按账号各自传入
40 },
41 };
42 return new WebDAVFileSystem(createClient(url, options), url, "/");
43 }
44
45 static fromSameClient(fs: WebDAVFileSystem, basePath: string) {
46 return new WebDAVFileSystem(fs.client, fs.url, basePath);

Callers 3

createMethod · 0.80
createTestFSFunction · 0.80
webdav.test.tsFile · 0.80

Calls 1

initWebDAVPatchFunction · 0.85

Tested by 1

createTestFSFunction · 0.64