reference:plugins:vfs_plugins:vfs_getfilesize

VFS_GetFileSize(
     HANDLE:hVFSData,
     LPVFSFUNCDATA:lpFuncData,
     LPTSTR:lpszPath,
     HANDLE:hFile,
     unsigned __int64*:piFileSize
)
→ BOOL

Arguments

hVFSData

[in] The handle to the namespace instance data

lpFuncData

[in] unused

lpszPath

[in] A null-terminated string containing the full pathname of the file to retrieve the size of.

hFile

[in] A handle to the file to retrieve the size of.

piFileSize

[out] Pointer to an unsigned 64 bit value to receive the file size.

Return value

If the file exists you should place its size in piFileSize and return TRUE. If the file does not exist or another error occurs you should return FALSE.

Description

The VFS_GetFileSize function is called to retrieve the size of a file in your plugin's namespace.

Directory Opus will either specify the pathname of the file in lpszPath or will provide a HANDLE to the file in hFile - never both. If hFile is specified it will be a file handle created by your VFS_CreateFile function. Your VFS_GetFileSize function should be able to handle both cases.