Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best approach to verify for exclusivity of a file
Message
From
08/08/2011 17:08:33
 
 
To
08/08/2011 16:33:06
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01520429
Message ID:
01520451
Views:
57
>You can try to open the file for exclusive read :
>Stream stream = File.Open(myfileName, FileMode.Open, FileAccess.read, FileShare.None);
>if an error you'll receive an ioexception....

That's what I was looking for.

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform