mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-01 11:29:41 +08:00
19 lines
482 B
TypeScript
19 lines
482 B
TypeScript
import { ipcRenderer } from 'electron'
|
|
import { getRawData } from '~/renderer/utils/common'
|
|
|
|
export default class SftpPlistApi {
|
|
static async delete (configMap: IStringKeyMap): Promise<boolean> {
|
|
const { fileName, config } = configMap
|
|
try {
|
|
const deleteResult = await ipcRenderer.invoke('delete-sftp-file',
|
|
getRawData(config),
|
|
fileName
|
|
)
|
|
return deleteResult
|
|
} catch (error) {
|
|
console.error(error)
|
|
return false
|
|
}
|
|
}
|
|
}
|