You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this has been brought up, or if something like this already exists in the library, but I thought it would be very helpful to have a comprehensive "path" class. ATL's CPathT is pretty good, but it would be nice to build on that with additional methods pertaining to PathCreateFromUrl, UrlCreateFromPath, SHGetKnownFolderPath, GetModuleFileName, GetTempPath, etc.
The text was updated successfully, but these errors were encountered:
This has been a longstanding desire of mine. std::filesystem::path is both inefficient and doesn't handle many Win32-isms properly (such as extended length paths) that I've effectively stopped using it. Perhaps one of these days I'll find the time to finish implementing one
Sure, a reasonable set of helpers around a counted buffer plus use of the PathCch family of APIs?
Well that would be good, but then you might as well use ATL's CPathT. My recommendation would be to add functions that are missing from CPathT, like those mentioned above, plus routine things that don't necessarily correspond to a single API function. For example:
getting the directory of the current module (as opposed to the current working directory)
getting the path to other files in the directory of the current module
creating temporary file paths using GUIDs (as recommended in the docs)
determining whether the path is a descendant of another path
having a "merge" function (as opposed to just append)
overloading operator+
I'd share my own code for this stuff (I've created a CPath2), but it's not very professional looking.
I'm not sure if this has been brought up, or if something like this already exists in the library, but I thought it would be very helpful to have a comprehensive "path" class. ATL's
CPathT
is pretty good, but it would be nice to build on that with additional methods pertaining toPathCreateFromUrl
,UrlCreateFromPath
,SHGetKnownFolderPath
,GetModuleFileName
,GetTempPath
, etc.The text was updated successfully, but these errors were encountered: