fs/Traits: add GetPathSuffix()
This commit is contained in:
		| @@ -96,6 +96,11 @@ struct PathTraitsFS { | |||||||
| 			: nullptr; | 			: nullptr; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	gcc_pure | ||||||
|  | 	static const_pointer GetPathSuffix(const_pointer path) noexcept { | ||||||
|  | 		return GetFilenameSuffix(GetBase(path)); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| #ifdef _WIN32 | #ifdef _WIN32 | ||||||
| 	gcc_pure gcc_nonnull_all | 	gcc_pure gcc_nonnull_all | ||||||
| 	static constexpr bool IsDrive(const_pointer p) noexcept { | 	static constexpr bool IsDrive(const_pointer p) noexcept { | ||||||
| @@ -215,6 +220,11 @@ struct PathTraitsUTF8 { | |||||||
| 			: nullptr; | 			: nullptr; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	gcc_pure | ||||||
|  | 	static const_pointer GetPathSuffix(const_pointer path) noexcept { | ||||||
|  | 		return GetFilenameSuffix(GetBase(path)); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| #ifdef _WIN32 | #ifdef _WIN32 | ||||||
| 	gcc_pure gcc_nonnull_all | 	gcc_pure gcc_nonnull_all | ||||||
| 	static constexpr bool IsDrive(const_pointer p) noexcept { | 	static constexpr bool IsDrive(const_pointer p) noexcept { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann