reference:plugins:vfs_plugins:vfs_movefile

VFS_MoveFile(
     HANDLE:hVFSData,
     LPVFSFUNCDATA:lpFuncData,
     LPTSTR:lpszOldPath,
     LPTSTR:lpszNewPath
)
→ BOOL

Arguments

hVFSData

[in] The handle to the namespace instance data

lpFuncData

[in] unused

lpszOldPath

[in] Null-terminated string representing the full path of the file to move or rename

lpszNewPath

[in] Null-terminated string representing the new pathname of the file

Return value

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

Description

The VFS_MoveFile function is called to rename a file or folder in your plugin's namespace, or to move a file or folder from one location to another.

You must check the paths provided to determine whether this is a simple rename or a move operation. If you don't support moving of files from one folder to another via a rename you should return FALSE and set the error code to VFSERR_NOT_SUPPORTED - Opus will then fallback to moving the file via copy and delete.