Пример #1
0
        private void Init(string path, bool checkHost)
        {
            // Special case "<DriveLetter>:" to point to "<CurrentDirectory>" instead
            if ((path.Length == 2) && (path[1] == ':'))
            {
                OriginalPath = ".";
            }
            else
            {
                OriginalPath = path;
            }

            // Must fully qualify the path for the security check
            string fullPath = Directory.GetFullPathAndCheckPermissions(path, checkHost: checkHost);

            FullPath    = fullPath;
            DisplayPath = GetDisplayName(OriginalPath, FullPath);
        }