Increase the file path in the directory specified in the path

I have a promotion path that points to some directory. How to create a path pointing to a file in this directory?

Please comment if this is an obvious thing. Im new to C ++ and in Java it's easy:

File file = new File(theDirectory, "filename.txt"); 
+4
source share
2 answers

use append for example.

 path /= filename; 
+3
source

The path has the convenience of operator/ , which may be useful for this purpose:

 auto file = directory / "filename"; 
+2
source

Source: https://habr.com/ru/post/1432137/


All Articles