std::fs::write("file.ext",&content);//writes, content to file.ext. If file.ext doesn't exist it creates it. That works.
Literally next line:
std::fs::read("file.ext");//gives error=> File doesn't exist. But the file exists.
I know where the problem is, the path to the read is incorrect that is, it is not pointing to the file, but if the path to the write in such form is correct, read should be able to deduce same path that file was created when using std::fs::write
Can you give us an example program that fails and which we can run for ourselves. Also, please add an unwrap or other error handling to write to verify that it did not encounter an IO error when writing.