| 351 | return m_path.substr( m_lastPathDelimiterIdx + 1, m_extensionDelimiterIdx - m_lastPathDelimiterIdx - 1 ); |
| 352 | } |
| 353 | |
| 354 | String DataPath::GetDirectoryName() const |
| 355 | { |
| 356 | EE_ASSERT( IsValid() && IsDirectoryPath() ); |
| 357 | |
| 358 | size_t idx = m_path.rfind( s_pathDelimiter ); |
| 359 | EE_ASSERT( idx != String::npos ); |
| 360 | |
| 361 | idx = m_path.rfind( s_pathDelimiter, Math::Max( size_t( 0 ), idx - 1 ) ); |
| 362 | if ( idx == String::npos ) |
| 363 | { |
| 364 | return String(); |
| 365 | } |
| 366 | |
| 367 | idx++; |
| 368 | return m_path.substr( idx, m_path.length() - idx - 1 ); |
| 369 | } |
| 370 | |
| 371 | bool DataPath::HasParentDirectory() const |
| 372 | { |
| 373 | EE_ASSERT( IsValid() ); |
no test coverage detected