I am Creating a new File using RandomAccessFile with "rw" mode. but it gives
java.io.FileNotFoundException: ../dir/test.txt (No such file or directory)
This is how i created:
File baseDirAsFile = new File("../");
File dirFile = new File(baseDirAsFile, "dir");
File file = new File(dirFile, "test.txt");
RandomAccessFile raf = new RandomAccessFile(file, "rw");
Note: It is not throwing that exception all the time. But can't identify when and why it is throwing this at some particular time.