static FileSystemUtilities()
 {
     SPECIAL_FOLDERS = new List <string>();
     SPECIAL_FOLDERS_MANUAL_MATCHMAKING = new List <KeyValuePair <string, Environment.SpecialFolder> >();
     SPECIAL_FOLDERS.AddRange(ClassReflectionUtilities.GetEnumerableOptions(typeof(Environment.SpecialFolder)));
     SPECIAL_FOLDERS_MANUAL_MATCHMAKING.Add(new KeyValuePair <string, Environment.SpecialFolder>("This PC", Environment.SpecialFolder.MyComputer));
     INVALID_FILE_PATH_CHARACTERS = new List <char>();
     INVALID_FILE_PATH_CHARACTERS.AddRange(Path.GetInvalidFileNameChars().Where(c => !INVALID_FILE_PATH_CHARACTERS.Contains(c)));
     INVALID_FILE_PATH_CHARACTERS.AddRange(Path.GetInvalidPathChars().Where(c => !INVALID_FILE_PATH_CHARACTERS.Contains(c)));
     INVALID_FILE_PATH_CHARACTERS.AddRange("\"?".ToCharArray());
 }
        public static String GetSpecialFolderFullPath(String fileName)
        {
            fileName = fileName.Replace(" ", "").Trim();
            Enum targetEnum = ClassReflectionUtilities.GetEnumerableTypeByDescription(typeof(Environment.SpecialFolder), fileName);

            if (targetEnum == null)
            {
                foreach (KeyValuePair <string, Environment.SpecialFolder> kvp in SPECIAL_FOLDERS_MANUAL_MATCHMAKING)
                {
                    if (kvp.Key.Replace(" ", "").Equals(fileName, StringComparison.OrdinalIgnoreCase))
                    {
                        targetEnum = kvp.Value;
                        break;
                    }
                }
            }
            if (targetEnum == null)
            {
                return(null);
            }

            return(System.Environment.GetFolderPath((Environment.SpecialFolder)targetEnum));
        }