mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Move MFTSearch to find file plugin.
This commit is contained in:
33
Plugins/Wox.Plugin.FindFile/MFTSearch/USNRecord.cs
Normal file
33
Plugins/Wox.Plugin.FindFile/MFTSearch/USNRecord.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace Wox.Infrastructure.MFTSearch
|
||||
{
|
||||
public class USNRecord
|
||||
{
|
||||
|
||||
public string Name { get; set; }
|
||||
public ulong FRN { get; set; }
|
||||
public UInt64 ParentFrn { get; set; }
|
||||
public string FullPath { get; set; }
|
||||
public bool IsVolumeRoot { get; set; }
|
||||
public bool IsFolder { get; set; }
|
||||
public string VolumeName { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.IsNullOrEmpty(FullPath) ? Name : FullPath;
|
||||
}
|
||||
|
||||
public static USNRecord ParseUSN(string volume, PInvokeWin32.USN_RECORD usn)
|
||||
{
|
||||
return new USNRecord
|
||||
{
|
||||
FRN = usn.FRN,
|
||||
Name = usn.FileName,
|
||||
ParentFrn = usn.ParentFRN,
|
||||
IsFolder = usn.IsFolder,
|
||||
VolumeName = volume
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user