ipkiss
ipkiss

Reputation: 13651

Question about RandomAccessFile in Java?

I am reading some Java text about RandomAccessFile, in the text, the author says:

RandomAccessFile(File file, String mode)

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

Answers (1)

Ted Hopp
Ted Hopp

Reputation: 234795

File metadata in Java is explained here. An example of metadata that might not be updated immediately with "rwd" mode would be if you set the file modification time by calling Files.setLastModifiedTime(file, time).

Upvotes: 5

Related Questions