jjacksn
asked on
How does RandomFileAccess lock at the OS level?
If I open a filed using the RandomFileAccess command and "rw", will the OS stop the file from being written to by any other program? will a subsequent call using "rw" fail?
Would this differ between windows and *nix?
Would this differ between windows and *nix?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
objects, that's great thanks.
I do know, at least in windows, that I've been looking at a file, and then tried to right to it, and it was "locked" by another program. I don't mind if someone is reading the old data, so long as that don't to write to it until the first method call finished. Can this be accomplished?
I do know, at least in windows, that I've been looking at a file, and then tried to right to it, and it was "locked" by another program. I don't mind if someone is reading the old data, so long as that don't to write to it until the first method call finished. Can this be accomplished?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
in the simplest case, I want to open a file what to open a file such that no one else can write to it while it is open... I know you can do this in windows, at least.
However, calling
raf = new RandomAccessFile(fileName,
raf = new RandomAccessFile(fileName,
works... so that's not going to do it. does the normal File object?