I spend a lot of time crapping on the stl, but I must admit that std::filesystem is one of the better additions to the stl. I used to not care for it, but since I've been writing more cross-platform code it's been one thing less I have to worry about.
-
Näytä tämä ketju
-
If you ask me, the stl shines in cross-platform/architecture code. The thread library. Filesystem. Atomics. I happily use these instead of writing my own, whereas I'll write my own containers and other types.
1 vastaus 0 uudelleentwiittausta 2 tykkäystäNäytä tämä ketju -
The only place where this gets iffy is when things like filesystem use types I don’t want to use, like string, vector, or whatever. Path::getu8string() annoyingly only comes back as a std::string. No way to extract the u8string into a provided buffer.
1 vastaus 0 uudelleentwiittausta 0 tykkäystäNäytä tämä ketju -
Vastauksena käyttäjälle @tloch14
what are you using filesystem for? depending on needs I find physfs to be really good, abstracts away OS specific junk and has some cool logical directory mechanism
2 vastausta 0 uudelleentwiittausta 0 tykkäystä
Two primary cases for me are iterating through directories (recursive and one-deep) and checking last write times. Mostly to manage when to bake and re-bake assets from source files to a baked file. Also to reload resulting baked files.
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.