text: public static ParsePathType PathType(FileInfo f){int pathLength = 0;ParsePathType? ppt;if (pathName2Type.TryGetValue(f.Name.ToUpperInvariant(), out ppt) && ppt != null){return ppt.Value;}DirectoryInfo parentDir = f.Directory;while (parentDir != null && ++pathLength < MAX_PATH_LENGTH){if (pathName2Type.TryGetValue(parentDir.Name.ToUpperInvariant(), out ppt) && ppt != null){return ppt.Value;}parentDir = parentDir.Parent;}return DEFAULT_PATH_TYPE;}