Re: How to determine which IOException occured?
- From: "Truong Hong Thi" <thi1981@xxxxxxxxx>
- Date: 13 Nov 2005 22:34:24 -0800
There is not something like error code in IOException. If you want to
differentiate such cases, you may need to check prior to copying:
- to check if the file already exists, you could use File.Exist
- user does not have rights: it throws UnauthorizedAccessException. If
you mean Code Access permission, then it throws SecurityException.
- being used by other process: if the file is locked to not allow
writing, you could still read and copy it
If that does not help, then you may need to call Windows API directly.
---
Thi
.
- References:
- How to determine which IOException occured?
- From: akeroo
- How to determine which IOException occured?
- Prev by Date: Creating an error handler for my application
- Next by Date: Re: Creating an error handler for my application
- Previous by thread: How to determine which IOException occured?
- Next by thread: Creating an error handler for my application
- Index(es):
Relevant Pages
|
Loading