IOExceptionsView
Handle IO exceptions: catch exceptions and display the following errors.
Options
ErrorArgument
GameObjectError in case of the
ArgumentNullExceptionorArgumentException.ErrorLongPath
GameObjectError in case of the
PathTooLongException.ErrorUnauthorizedAccess
GameObjectError in case of the
UnauthorizedAccessException.ErrorSecurity
GameObjectError in case of the
SecurityException.ErrorDirectoryNotFound
GameObjectError in case of the
DirectoryNotFoundException.ErrorIO
GameObjectError 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));
}
}