File Moving and User Concurrency

G

Guest

We have a situation where we want users in an asp.net application to access
the same directory containing image files (tif,jpg,etc). When a user click's
a button, then the next available image in the directory will be moved into
their own personal directory and out of the shared directory. It is critical
that no 2 user's ever have the same file in their personal directory.

User's will not be individually selecting these files, it will simply be the
1st file in the Directory.GetFiles() method of the shared directory.

Is the File.Move method developed in a way that keeps 2 files from being
moved at the same time or does something like SyncLock need to be used in
order to prevent the same file from being copied.

Thanks for any help...
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top