File Locking Forced? Newbie question.

S

Sparky

Hello! I am writing some software that will have many users accessing
the same file resource at once for reading purposes only. I am
programming on (Ubuntu) Linux and my question is in Windows, can I
have it so that the same file can be open in read mode by more than
one person or could Window's file locking system get in the way?

Thanks,
Sam
 
T

Tim Golden

Sparky said:
Hello! I am writing some software that will have many users accessing
the same file resource at once for reading purposes only. I am
programming on (Ubuntu) Linux and my question is in Windows, can I
have it so that the same file can be open in read mode by more than
one person or could Window's file locking system get in the way?

Assuming your question is: can processes A, B & C read
from the same file at the same time, then: Yes. (You
can try it out yourself fairly easily if you want. Just
open a clutch of interpreter windows and do some
open ("abc.txt", "r").read () stuff in each one).

But I'm surprised you think that anything might get
in the way of that. It would be a fairly limiting file
system which prevented multiple simultaneous readers.

TJG
 
S

Sparky

Assuming your question is: can processes A, B & C read
from the same file at the same time, then: Yes. (You
can try it out yourself fairly easily if you want. Just
open a clutch of interpreter windows and do some
open ("abc.txt", "r").read () stuff in each one).

But I'm surprised you think that anything might get
in the way of that. It would be a fairly limiting file
system which prevented multiple simultaneous readers.

TJG

Thank you. For some reason I thought there was a file locking system
on Windows (http://en.wikipedia.org/wiki/
File_locking#File_locking_in_Microsoft_Windows). But, I believe that
that only applies to those using Microsoft's file methods and only for
writing. Thanks for clearing that up.

Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top