~~Title: Miscellaneous Functions~~ The [[:reference:plugins:vfs_plugins:vfs_getpathparentroot|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. BOOL VFS_GetPathParentRoot ( HANDLE hVFSData, LPTSTR lpszPath, BOOL fRoot, LPTSTR lpszNewPath, int cchNewPathMax ) **hVFSData** is your plugin's namespace instance data. **lpszPath** points to the current path within your plugin's namespace. If **fRoot** is set to **TRUE** then Opus wants you to calculate the root folder of this path - if set to **FALSE**, Opus wants the parent folder. **lpszNewPath** points to a buffer into which you copy the new path string - **cchNewPathMax** specifies the size of this buffer in characters. If it is possible to calculate the desired path you should place the new path in the supplied buffer and return **TRUE**. If it is not possible to calculate the desired path, you should return **FALSE**. For example, if the supplied path indicates the root of your namespace then it is not possible to go up any further, and you should return **FALSE**. If you do not provide this function then Opus applies standard path parsing rules to calculate the desired path. The [[:reference:plugins:vfs_plugins:vfs_getfreediskspace|VFS_GetFreeDiskSpace]] function should be provided if your plugin is able to supply meaningful information about free and used disk space. If this is not meaningful for your plugin do not provide this function. BOOL VFS_GetFreeDiskSpace ( HANDLE hVFSData, LPVFSFUNCDATA lpFuncData, LPTSTR lpszPath, unsigned __int64* piFreeBytesAvailable, unsigned __int64* piTotalBytes, unsigned __int64* piTotalFreeBytes ) **hVFSData** is your namespace instance data, and **lpFuncData** is currently unused. **lpszPath** points to a string containing the full path for which you should return disk space information. The three remaining parameters all point to unsigned 64-bit values into which you should place the appropriate information. Note that Opus may not necessarily request all three values at the same time, so you should check if the pointers provided are non-NULL before calculating and returning the values. **piFreeBytesAvailable** is the total number of free bytes available for the current user, **piTotalBytes** is the total number of bytes on the disk (both used and free) and **piTotalFreeBytes** is the total number of free bytes on the disk. **piFreeBytesAvailable** and **piTotalFreeBytes** are often the same value. For prefix-style plugins, the [[:reference:plugins:vfs_plugins:vfs_getpathdisplayname|VFS_GetPathDisplayName]] function can be used to convert the path formats used by your plugin to a pretty path for display to the user. BOOL VFS_GetPathDisplayName ( HANDLE hVFSData, LPTSTR lpszPath, LPTSTR lpszDisplayName, int cbDisplayNameMax ) **hVFSData** is your plugin's namespace instance data. **lpszPath** points to the current path within your plugin's namespace. **lpszDisplayName** and **cbDisplayNameMax** provide a buffer into which you can copy the "pretty" form of the path. For example, you may wish to encode user-name or password information into your URL-style paths, but obviously would not want this information to be displayed to the user. The Opus internal FTP support uses this method. Internally, FTP paths are stored 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.