Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • Are you asking if a path has a volume name in it, or if the entirety of the path is just a volume name? Commented Apr 17, 2020 at 14:23
  • @NicolBolas the entirety of the path shall be just that volumen name. I will clarify that in my question. Thanks Commented Apr 17, 2020 at 14:24
  • Does this answer the question? Obviously use find instead of rfind. Commented Apr 17, 2020 at 14:27
  • @Cortex not really. I want to know if my path is the volume (the root of it), not if it contains a volume. Commented Apr 17, 2020 at 14:28
  • 2
    I don't have a windows installation right here, but wouldn't it be better to use std::filesystem::path::root_path on path and then check if they are equal? Commented Apr 17, 2020 at 14:31