473,320 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

File Locking Forced? Newbie question.

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
Jul 15 '08 #1
2 1007
Sparky wrote:
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
Jul 15 '08 #2
On Jul 15, 11:38*am, Tim Golden <m...@timgolden.me.ukwrote:
Sparky wrote:
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
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
Jul 15 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Dino | last post by:
dear all, i've created an application for a customer where the customer can upload ..csv-files into a specified ftp-directory. on the server, a php-script, triggered by a cronjob, reads all the...
2
by: Geoffrey | last post by:
We have developed a python class that can read data files created from another application. These target files are C-ISAM files used for accounting applications so the "primary" application may be...
2
by: Kamus of Kadizhar | last post by:
Thanks to Robert Brewer, I got enough insight into logging to make it work.... Now I have another issue: file locking. Sorry if this is a very basic question, but I can't find a handy reference...
12
by: Riley DeWiley | last post by:
I have a project that is using a Jet backend and having trouble with Jet's tendency to bloat it's MDB file. I can compact it but it is a hassle. I am considering switching to a Fox backend but have...
2
by: Corne' Cornelius | last post by:
Hi, When you open a file for writing/appending with open() or fopen(), and you have multiple applications that might want to write to the same file at the same time, could that cause weirdness...
5
by: Chris Mullins | last post by:
I've spent some time recently looking into optimizing some memory usage in our products. Much of this was doing through the use of string Interning. I spent the time and checked numbers in both x86...
16
by: Eran.Yasso | last post by:
Hi, I have a mdb file shared in the LAN. I want to write app that verifies if it's open. If the file is not open, then my app can open the file. if the file is used, then the app won't open it....
0
by: Andrey | last post by:
HI i have a newbie question about the file() function. I have 2 daemons running on my linux box. 1 will record the IDs to a file - logs.txt other 1 will open this file, read the IDs, and then...
15
by: Matt Brandt | last post by:
I am trying to get multiple threads to lock specific regions of a file. However, since each thread has the same PID, it appears that a lock by one thread does not block another thread from the same...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.