26 Apr
2007
26 Apr
'07
8:04 p.m.
Luca Cappa
path filepath;// this is a path to a file if (exists(filepath) && !is_directory(filepath)) { ... the file is there }
Thank you. I can make it work with relative paths such as: fs::path file_path( "test2/dir1/file01.txt" ); // works fs::path file_path( "somefile.txt" ); // works I just cannot figure out now is how to specify the drive and directory: fs::path file_path( "C:/Logs/log.txt" ); // does not work I need the ability to specify the explicit path since my paths will be provided at runtime (from user input and INI files) therefore I cannot rely on paths relative to the application. Thanks in advance