IWebDAVStoreItem.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. using System;
  2. namespace WebDAVSharp.Server.Stores
  3. {
  4. /// <summary>
  5. /// This interface must be implemented by classes that will function as a store item,
  6. /// which is either a document (
  7. /// <see cref="IWebDavStoreDocument" />) or a
  8. /// collection of documents (
  9. /// <see cref="IWebDavStoreCollection" />.)
  10. /// </summary>
  11. public interface IWebDavStoreItem
  12. {
  13. /// <summary>
  14. /// </summary>
  15. Uri Href { get; set; }
  16. /// <summary>
  17. /// Gets the size of the document in bytes.
  18. /// </summary>
  19. long Size { get; }
  20. /// <summary>
  21. /// Gets the mime type of <see cref="IWebDavStoreItem" />.
  22. /// </summary>
  23. /// <value>
  24. /// The type of the MIME.
  25. /// </value>
  26. string MimeType { get; }
  27. /// <summary>
  28. /// Gets the etag of this <see cref="IWebDavStoreItem" />.
  29. /// </summary>
  30. /// <value>
  31. /// The etag.
  32. /// </value>
  33. string Etag { get; }
  34. /// <summary>
  35. /// </summary>
  36. IWebDavStore Store { get; }
  37. /// <summary>
  38. /// Gets the parent <see cref="IWebDavStoreCollection" /> that owns this <see cref="IWebDavStoreItem" />.
  39. /// </summary>
  40. /// <value>
  41. /// The parent collection.
  42. /// </value>
  43. IWebDavStoreCollection ParentCollection { get; }
  44. /// <summary>
  45. /// Gets or sets the name of this <see cref="IWebDavStoreItem" />.
  46. /// </summary>
  47. /// <value>
  48. /// The name.
  49. /// </value>
  50. string Name { get; set; }
  51. /// <summary>
  52. /// Gets the ItemPath of this <see cref="IWebDavStoreItem" />.
  53. /// </summary>
  54. /// <value>
  55. /// The item path.
  56. /// </value>
  57. string ItemPath { get; }
  58. /// <summary>
  59. /// Gets if this <see cref="IWebDavStoreItem" /> is a collection.
  60. /// </summary>
  61. /// <value>
  62. /// <c>true</c> if this instance is collection; otherwise, <c>false</c>.
  63. /// </value>
  64. bool IsCollection { get; }
  65. /// <summary>
  66. /// Gets the creation date of this <see cref="IWebDavStoreItem" />.
  67. /// </summary>
  68. /// <value>
  69. /// The creation date.
  70. /// </value>
  71. DateTime CreationDate { get; }
  72. /// <summary>
  73. /// Gets the modification date of this <see cref="IWebDavStoreItem" />.
  74. /// </summary>
  75. /// <value>
  76. /// The modification date.
  77. /// </value>
  78. DateTime ModificationDate { get; }
  79. /// <summary>
  80. /// This is a guid uniquely identifying the store item.
  81. /// </summary>
  82. /// <returns></returns>
  83. Guid GetRepl_uId();
  84. /// <summary>
  85. /// Returns the file info.
  86. /// </summary>
  87. /// <returns></returns>
  88. IWebDavFileInfo GetFileInfo();
  89. }
  90. }