$0The example shown above resolves to true even if the path does not exist.$0
$0staticvoid DisplayFileSystemInfoAttributes(FileSystemInfo fsi)
{
// Assume that this entry is a file.string entryType = "File";
// Determine if entry is really a directoryif ((fsi.Attributes &;; FileAttributes.Directory) == FileAttributes.Directory )
{
entryType = "Directory";
}
// Show this entry's type, name, and creation date.
Console.WriteLine("{0} entry {1} was created on {2:D}", entryType, fsi.FullName, fsi.CreationTime);
}$0
$0$0
$0This will exclude paths that do not exist:$0
$0if ((fi.Attributes > 0) &;;&;; (fi.Attributes &;; FileAttributes.Directory) == FileAttributes.Directory) { }$0