Changeset 2172 for branches/eraser6/6.0


Ignore:
Timestamp:
6/13/2010 9:57:37 AM (5 years ago)
Author:
lowjoel
Message:

Supplements r2170: some functions can be used when the drive is not mounted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/6.0/Eraser.Util/VolumeInfo.cs

    r2168 r2172  
    9191        private List<string> GetLocalVolumeMountPoints() 
    9292        { 
    93             if (!IsReady) 
    94                 throw new InvalidOperationException("The volume has not been mounted or is not " + 
    95                     "currently ready."); 
    96  
    9793            List<string> result = new List<string>(); 
    9894 
     
    369365            get 
    370366            { 
    371                 if (!IsReady) 
    372                     throw new InvalidOperationException("The volume has not been mounted or is not " + 
    373                         "currently ready."); 
    374367                return (DriveType)KernelApi.NativeMethods.GetDriveType(VolumeId); 
    375368            } 
     
    563556            get 
    564557            { 
    565                 if (!IsReady) 
    566                     throw new InvalidOperationException("The volume has not been mounted or is not " + 
    567                         "currently ready."); 
    568  
    569558                return (VolumeType == DriveType.Network ? 
    570559                    GetNetworkMountPoints() : GetLocalVolumeMountPoints()).AsReadOnly(); 
     
    577566        public bool IsMounted 
    578567        { 
    579             get { return IsReady && MountPoints.Count != 0; } 
     568            get { return MountPoints.Count != 0; } 
    580569        } 
    581570 
Note: See TracChangeset for help on using the changeset viewer.