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

Function deleteFileFromServer

missav-explorer/missav-explorer.user.js:1913–1922  ·  view source on GitHub ↗
(folderName, fileName)

Source from the content-addressed store, hash-verified

1911 }
1912 // 实际删除文件的函数
1913 async function deleteFileFromServer(folderName, fileName) {
1914 const DELETE = {
1915 method: 'DELETE',
1916 path: folderName + '/' + fileName
1917 }
1918
1919 return new Promise((resolve, reject) => {
1920 GM_xhr({ ...DELETE, success: resolve, fail: reject })
1921 })
1922 }
1923
1924 // 检查文件夹是否存在
1925 async function checkFolderExists(folderName) {

Callers 1

deleteFileFunction · 0.85

Calls 1

GM_xhrFunction · 0.85

Tested by

no test coverage detected