Sidebar

Using Directory Opus
Configuration
Programming
Reference Section
reference:plugins:vfs_plugins:exported_functions_reference:vfs_deletefile

VFS_DeleteFile(
     HANDLE:hVFSData,
     LPVFSFUNCDATA:lpFuncData,
     LPTSTR:lpszPath,
     DWORD:dwFlags,
     int:iSecurePasses
)
→ BOOL

Arguments

hVFSData

[in] The handle to the namespace instance data

lpFuncData

[in] unused

lpszPath

[in] Null-terminated string representing the full path of the file to delete

dwFlags

[in] Flags relating to the delete operation.

VFSDELETEF_FORCEForce delete even if delete protected
VFSDELETEF_RECYCLEDelete to recycle bin if possible
VFSDELETEF_REPLACEReplacing an existing file during a copy operation
VFSDELETEF_COPYFAILEDBeing called to cleanup after a failed copy operation
VFSDELETEF_SOURCERESUMEThe source of the copy supports resume

iSecurePasses

[in] Number of secure delete passes to perform or 0 for normal delete

Return value

The function must return TRUE if the file was successfully deleted, or FALSE on failure. You should set an appropriate error code on failure that Opus can retrieve via VFS_GetLastError.

Description

The VFS_DeleteFile function is called to delete a file in your plugin's namespace.

The only flag it is important to support, if relevant to your plugin, is VFSDELETEF_FORCE. If your plugin supports resume of an interrupted copy and the VFSDELETEF_COPYFAILED flag is set you may elect to not delete the file.