Changeset 2148
- Timestamp:
- 5/16/2010 11:06:43 AM (3 years ago)
- Location:
- trunk/eraser
- Files:
-
- 3 edited
-
Eraser.Util.Native/OpenHandle.h (modified) (2 diffs)
-
Eraser.Util/ExtensionMethods/IO.cs (modified) (2 diffs)
-
Eraser.Util/VolumeInfo.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.Util.Native/OpenHandle.h
r2032 r2148 27 27 using namespace System::Collections::Generic; 28 28 using namespace System::Collections::ObjectModel; 29 using namespace System::Diagnostics; 29 30 using namespace Microsoft::Win32::SafeHandles; 30 31 … … 96 97 /// The process ID of the process owning the handle. 97 98 /// </summary> 98 property int ProcessId99 property Process^ Process 99 100 { 100 intget()101 System::Diagnostics::Process^ get() 101 102 { 102 return processId;103 return System::Diagnostics::Process::GetProcessById(processId); 103 104 } 104 105 }; -
trunk/eraser/Eraser.Util/ExtensionMethods/IO.cs
r2112 r2148 324 324 /// list will be empty if no ADSes exist.</returns> 325 325 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] 326 public static IList< string> GetADSes(this FileInfo info)327 { 328 List< string> result = new List<string>();326 public static IList<StreamInfo> GetADSes(this FileInfo info) 327 { 328 List<StreamInfo> result = new List<StreamInfo>(); 329 329 using (FileStream stream = new StreamInfo(info.FullName).Open(FileMode.Open, 330 330 FileAccess.Read, FileShare.ReadWrite)) … … 341 341 342 342 if (streamName.Length != 0) 343 result.Add( streamName);343 result.Add(new StreamInfo(info.FullName, streamName)); 344 344 } 345 345 } -
trunk/eraser/Eraser.Util/VolumeInfo.cs
r2147 r2148 21 21 22 22 using System; 23 using System.Linq; 23 24 using System.Collections.Generic; 24 25 using System.Text; … … 564 565 /// trailing backslash. 565 566 /// </summary> 566 public ReadOnlyCollection<string> MountPoints 567 { 568 get 569 { 570 return (VolumeType == DriveType.Network ? 571 GetNetworkMountPoints() : GetLocalVolumeMountPoints()).AsReadOnly(); 567 public IList<DirectoryInfo> MountPoints 568 { 569 get 570 { 571 List<string> paths = VolumeType == DriveType.Network ? 572 GetNetworkMountPoints() : GetLocalVolumeMountPoints(); 573 return new List<DirectoryInfo>( 574 paths.Select(x => new DirectoryInfo(x))).AsReadOnly(); 572 575 } 573 576 }
Note: See TracChangeset
for help on using the changeset viewer.
