FileAndDirectoryEntry.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using System;
  2. using Y.FileQueryEngine.UsnOperation;
  3. namespace Y.FileQueryEngine.QueryEngine
  4. {
  5. public class FileAndDirectoryEntry
  6. {
  7. protected UInt64 fileReferenceNumber;
  8. protected UInt64 parentFileReferenceNumber;
  9. protected string fileName;
  10. protected bool isFolder;
  11. protected string path;
  12. public UInt64 FileReferenceNumber
  13. {
  14. get
  15. {
  16. return this.fileReferenceNumber;
  17. }
  18. }
  19. public UInt64 ParentFileReferenceNumber
  20. {
  21. get
  22. {
  23. return this.parentFileReferenceNumber;
  24. }
  25. }
  26. public string FileName
  27. {
  28. get
  29. {
  30. return this.fileName;
  31. }
  32. }
  33. public string Path
  34. {
  35. get
  36. {
  37. return this.path;
  38. }
  39. }
  40. public string FullFileName
  41. {
  42. get
  43. {
  44. return string.Concat(this.path, "\\", this.fileName);
  45. }
  46. }
  47. public bool IsFolder
  48. {
  49. get
  50. {
  51. return this.isFolder;
  52. }
  53. }
  54. public FileAndDirectoryEntry(UsnEntry usnEntry, string path)
  55. {
  56. this.fileReferenceNumber = usnEntry.FileReferenceNumber;
  57. this.parentFileReferenceNumber = usnEntry.ParentFileReferenceNumber;
  58. this.fileName = usnEntry.FileName;
  59. this.isFolder = usnEntry.IsFolder;
  60. this.path = path;
  61. }
  62. }
  63. }