Add a new wxFileName function to resolve symlinks to absolute paths

This commit is contained in:
Ian McInerney
2021-04-01 18:40:21 +01:00
parent 152a2079b4
commit 53bd1391f4
5 changed files with 135 additions and 2 deletions

View File

@@ -1138,6 +1138,24 @@ public:
*/
bool ReplaceHomeDir(wxPathFormat format = wxPATH_NATIVE);
/**
Find the absolute path of the file/directory that is pointed to by this
path.
If this path isn't a symlink, then this function will return the current
path. If the path does not exist on disk, An empty wxFileName instance
will be returned.
@note This is only supported on Unix-like platforms (e.g. wxGTK, wxOSX),
on other platforms (e.g. wxMSW) this function just returns the
current path.
@since 3.1.5
@return The absolute path that the current symlink path points to.
*/
wxFileName ResolveLink();
/**
Deletes the specified directory from the file system.