Sidebar

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

VFS_GetPathDisplayName(
     HANDLE:hVFSData,
     LPTSTR:lpszPath,
     LPTSTR:lpszDisplayName,
     int:cchDisplayNameMax
)
→ BOOL

Arguments

hVFSData

[in] The handle to the namespace instance data

lpszPath

[in] A null-terminated string containing the full path in your plugin's namespace.

lpszDisplayName

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

cchDisplayNameMax

[in] Specifies the size of the buffer in characters

Return value

If you are able to return a pretty path for the supplied path, should copy it to the supplied buffer and return TRUE. If you do not wish to change the display of the path string you should return FALSE.

Description

The VFS_GetPathDisplayName function is called to convert a URL-style namespace path into a "pretty path" for display to the user.

The Opus internal FTP support uses this method. Internally, FTP paths are stored as and handled as ftp://user:password@ftpsite.com/path/to/folder, but the path displayed to the user has the user and password information removed - ftp://ftpsite.com/path/to/folder.

If you return FALSE from this function (or do not provide the function at all) then Opus will display paths as-is to the user.