IOExceptionsView
Handle IO exceptions: catch exceptions and display the following errors.
Options
ErrorArgument
GameObject
Error in case of the
ArgumentNullException
orArgumentException
.ErrorLongPath
GameObject
Error in case of the
PathTooLongException
.ErrorUnauthorizedAccess
GameObject
Error in case of the
UnauthorizedAccessException
.ErrorSecurity
GameObject
Error in case of the
SecurityException
.ErrorDirectoryNotFound
GameObject
Error in case of the
DirectoryNotFoundException
.ErrorIO
GameObject
Error in case of the
IOException
.
var result = ExceptionsView.Execute<ObservableList<TreeNode<FileSystemEntry>>>(FillDrivesList);
protected virtual void FillDrivesList(ObservableList<TreeNode<FileSystemEntry>> list)
{
foreach (var drive in Directory.GetLogicalDrives())
{
var item = new FileSystemEntry(drive, drive, false);
list.Add(new TreeNode<FileSystemEntry>(item, null));
}
}