Reputation: 13651
I am reading some Java text about RandomAccessFile, in the text, the author says:
RandomAccessFile(File file, String mode)
Mode “r” to open the file for reading only
Mode “rw” to open for both reading and writing
Mode “rws” is same as rw and any changes to the file’s content or metadata take place immediately (since java 5)
Mode “rwd” is same as rw, and changes to the file content, but not its metadata, take place immediately (since java 5)
I am not sure that I understand the difference between “rws” and “rwd”. I have tried to run some related code but did not see any points?
Can anyone have a clear example, please?
Upvotes: 2
Views: 1294