[Mono-list] Opening a read only file

Daniel Jackson carpman at gmail.com
Tue Feb 6 09:33:16 EST 2007


This might be answered somewhere else, if it is I'm sorry to waste
bandwidth, but I seem to have an odd problem. I'm trying to open a file that
I have read only permissions to as read only. This is the code I use:

FileStream mimeTypesFile = File.Open("/etc/mime.types", FileMode.Open);

This produces a System.UnauthorizedAccessException. If I set /etc/mime.types
to rw everything works. Is this a bug, or is there another way to open a
file read only?

-- 
http://www.voidptr.org
================
On no, not I,
I'll CLI!
As long as I have Bash to use
I know I'll feel alive
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070206/6602301c/attachment.html 


More information about the Mono-list mailing list