reference:plugins:plugin_sdk:batch_mode_functions:showfunctiondeletedlg

ShowFunctionDeleteDlg(
     LPVOID:lpFuncData,
     LPTSTR:lpszFileName,
     BOOL:fFolder,
     DWORD:dwFileCount,
     DWORD:dwFileSizeHigh,
     DWORD:dwFileSizeLow
)
→ int

Arguments

lpFuncData

[in] The value of the lpFuncData member of the VFSBATCHDATA structure

lpszFileName

[in] The name of the file or folder being deleted

fFolder

[in] Set to TRUE if this is a folder or FALSE for a file

dwFileCount

[in] For a folder, set to the number of files contained within the folder if this is known, otherwise set to 0. Ignored when deleting a file.

dwFileSizeHigh

[in] High-order DWORD value of the total size of all files within the folder, if known, otherwise set to 0. Ignored when deleting a file.

dwFileSizeLow

[in] Low-order DWORD value of the total size.

Return value

The return value depends upon the choice made by the user. Valid return values are:

DELETERES_ABORTDelete operation should be aborted
DELETERES_DELETEDelete the specified file or folder
DELETERES_DELETEALLDelete this and all subsequent files or folders
DELETERES_SKIPSkip this file, continue with next

Description

The ShowFunctionDeleteDlg function lets you more fully emulate Opus when performing a batch delete operation. It displays the confirmation dialog for deleting a file or folder.

You should only call this function for files if the BATCHF_DELETE_ASK_FILES flag is set in the VFSBATCHDATA structure. Similarly, you should only call it for folders if the BATCHF_DELETE_ASK_FOLDERS flag is set. You should not display any confirmation dialogs if BATCHF_DELETE_QUIET is set.

If you are able to easily calculate the total size of folders, you should provide this information when calling this function as it is then displayed to the user and may help them make a decision about deleting the folder.

If the return value is DELETERES_DELETEALL you should store this and not ask for confirmation for deleting files or folders again (for the duration of this batch operation.)