reference:plugins:plugin_sdk:batch_mode_functions:addfunctionfilechange

AddFunctionFileChange(
     LPVOID:lpFuncData,
     BOOL:fIsDest,
     int:iType,
     LPTSTR:lpszFile
)
→ void

Arguments

lpFuncData

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

fIsDest

[in] Set to TRUE if your namespace is the destination of the batch operation, or FALSE if it is the source

iType

[in] Event that has occurred - valid values are:

OPUSFILECHANGE_CREATENew file created
OPUSFILECHANGE_DELETEFile deleted
OPUSFILECHANGE_CHANGEExisting file or folder changed (eg size, date)
OPUSFILECHANGE_MAKEDIRNew folder created
OPUSFILECHANGE_REMDIRFolder deleted
OPUSFILECHANGE_REFRESHRe-read folder when function completes

lpszFile

[in] Full path name (including your namespace path) of file or folder involved. Ignored for OPUSFILECHANGE_REFRESH.

Return value

None.

Description

The AddFunctionFileChange function lets you notify Opus of changes to files within your plugin's namespace.

Because your plugin completely handles a batch-mode operation itself, you need to use this function to inform Opus of any changes to your namespace. If you don't want to track individual file or folder changes you can send the OPUSFILECHANGE_REFRESH notification, which will cause the currently displayed folder to be automatically re-read once the function is complete.