added wxFileName::GetVolumeString() (#9950)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-09-14 01:18:05 +00:00
parent 19abad600c
commit 35c2aa4f19
4 changed files with 74 additions and 19 deletions

View File

@@ -1953,6 +1953,23 @@ wxPathFormat wxFileName::GetFormat( wxPathFormat format )
return format;
}
#ifdef wxHAS_FILESYSTEM_VOLUMES
/* static */
wxString wxFileName::GetVolumeString(char drive, int flags)
{
wxASSERT_MSG( !(flags & ~wxPATH_GET_SEPARATOR), "invalid flag specified" );
wxString vol(drive);
vol += wxFILE_SEP_DSK;
if ( flags & wxPATH_GET_SEPARATOR )
vol += wxFILE_SEP_PATH;
return vol;
}
#endif // wxHAS_FILESYSTEM_VOLUMES
// ----------------------------------------------------------------------------
// path splitting function
// ----------------------------------------------------------------------------