private static bool IsDir(string input) { return (File.GetAttributes(input) & FileAttributes.Directory) == FileAttributes.Directory; }