]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
add wxGenericStaticText (#9656)
[wxWidgets.git] / src / common / filename.cpp
index 1e3444bc87a029c34158026a7e6be46f01c1cc19..9285be0e5d3e46942498dffda10d8476d855cd54 100644 (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
 // ----------------------------------------------------------------------------