Imported Upstream version 3.12.0

Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
Jo Shields
2015-01-13 10:44:36 +00:00
parent 8b9b85e7f5
commit 181b81b4a4
659 changed files with 12743 additions and 16300 deletions

View File

@ -6,10 +6,12 @@
// Jim Richardson, develop@wtfo-guru.com
// Dan Lewis, dihlewis@yahoo.co.uk
// Sebastien Pouliot <sebastien@ximian.com>
// Marek Safar <marek.safar@gmail.com>
//
// Copyright (C) 2002 Ximian, Inc.
// Copyright (C) 2001 Moonlight Enterprises, All Rights Reserved
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
// Copyright (C) 2014 Xamarin, Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@ -441,25 +443,19 @@ namespace System.IO {
throw MonoIO.GetException (Path.GetDirectoryName (path_with_pattern), (MonoIOError) error);
try {
if (((rattr & FileAttributes.ReparsePoint) == 0)){
if ((rattr & FileAttributes.Directory) != 0)
yield return new DirectoryInfo (s);
else
yield return new FileInfo (s);
}
while ((s = MonoIO.FindNext (handle, out rattr, out error)) != null){
if ((rattr & FileAttributes.ReparsePoint) != 0)
continue;
if ((rattr & FileAttributes.Directory) != 0)
yield return new DirectoryInfo (s);
else
yield return new FileInfo (s);
do {
if (((rattr & FileAttributes.ReparsePoint) == 0)){
if ((rattr & FileAttributes.Directory) != 0)
yield return new DirectoryInfo (s);
else
yield return new FileInfo (s);
}
if (((rattr & FileAttributes.Directory) != 0) && subdirs)
foreach (FileSystemInfo child in EnumerateFileSystemInfos (s, searchPattern, searchOption))
yield return child;
}
} while ((s = MonoIO.FindNext (handle, out rattr, out error)) != null);
} finally {
MonoIO.FindClose (handle);
}