Ejemplo n.º 1
0
        private DiscFileSystem GetFileSystem(VolumeInfo volInfo, out bool dispose)
        {
            if (DriveInfo != null)
            {
                dispose = false;
                return(DriveInfo.GetFileSystem(volInfo));
            }
            else
            {
                // TODO: proper file system detection
                if (volInfo.BiosType == 7)
                {
                    dispose = true;
                    return(new NtfsFileSystem(volInfo.Open()));
                }
            }

            dispose = false;
            return(null);
        }