Пример #1
0
        /// <summary>
        /// Gets a value indicating wether this path is located on a removable drive type.
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static bool IsRemovable(string path)
        {
            // UNC is always removable
            if (PathIsUnc(path))
            {
                return(true);
            }

            DriveInfo driveInfo = GetDriveInfo(path);

            if (driveInfo != null)
            {
                return(driveInfo.IsRemovable());
            }
            else
            {
                return(true);
            }
        }