MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / createFolder

Function createFolder

missav-explorer/missav-explorer.user.js:1777–1794  ·  view source on GitHub ↗
(folderName)

Source from the content-addressed store, hash-verified

1775
1776 // 在 WebDAV 中创建新文件夹
1777 async function createFolder(folderName) {
1778 const MKCOL = {
1779 method: 'MKCOL',
1780 path: folderName.endsWith('/') ? folderName : folderName + '/',
1781 success: () => {
1782 alert('文件夹创建成功')
1783 },
1784 fail: (xhr) => {
1785 if (xhr.status === 409) {
1786 // alert('冲突:文件夹可能已经存在或路径不正确');
1787 } else {
1788 //alert('创建文件夹失败:' + xhr.status);
1789 }
1790 }
1791 }
1792
1793 await GM_xhr({ ...MKCOL })
1794 }
1795
1796 // 上传文件到 WebDAV
1797

Callers

nothing calls this directly

Calls 1

GM_xhrFunction · 0.85

Tested by

no test coverage detected