Restored wxFileName::GetFullPath()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2001-07-14 14:29:09 +00:00
parent 2985ad5dee
commit dcf0fce44b

View File

@@ -530,8 +530,44 @@ wxString wxFileName::GetPath( bool add_separator, wxPathFormat format ) const
wxString wxFileName::GetFullPath( wxPathFormat format ) const
{
(void)format;
return GetPathWithSep() + GetFullName();
format = GetFormat( format );
wxString ret;
if (format == wxPATH_DOS)
{
for (size_t i = 0; i < m_dirs.GetCount(); i++)
{
ret += m_dirs[i];
ret += '\\';
}
}
else
if (format == wxPATH_UNIX)
{
for (size_t i = 0; i < m_dirs.GetCount(); i++)
{
ret += m_dirs[i];
ret += '/';
}
}
else
{
for (size_t i = 0; i < m_dirs.GetCount(); i++)
{
ret += m_dirs[i];
ret += ':';
}
}
ret += m_name;
if (!m_ext.IsEmpty())
{
ret += '.';
ret += m_ext;
}
return ret;
}
// Return the short form of the path (returns identity on non-Windows platforms)