Sidebar

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

VFS_GetPathParentRoot(
     HANDLE:hVFSData,
     LPTSTR:lpszPath,
     BOOL:fRoot,
     LPTSTR:lpszNewPath,
     int:cchNewPathMax
)
→ BOOL

Arguments

hVFSData

[in] The handle to the namespace instance data

lpszPath

[in] A null-terminated string containing the full path to calculate the parent or root of.

fRoot

[in] Set to TRUE for a root or FALSE for a parent.

lpszNewPath

[out] Points to a buffer into which you must copy the calculated path.

cchNewPathMax

[in] Specifies the size of the buffer in characters

Return value

If you are able to calculate the path you should copy it to the supplied buffer and return TRUE. If it is not possible to calculate the desired path you should return FALSE.

Description

The VFS_GetPathParentRoot function is called to calculate the parent or root path of a path in your plugin's namespace.

The VFS_GetPathParentRoot function can be provided by your plugin if you want to do custom path processing whenever Opus needs to calculate the parent or root folder of a folder in your plugin's namespace. Opus calls this function if you set the VFSCAPABILITY_LETMEDOPARENTS capabilities flag.

If you do not provide this function then Opus applies standard path parsing rules to calculate the desired path.