IWebDAVStoreDocument.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System.IO;
  2. namespace Mtp2Dav.WebDAVSharp.Server._1d2086a502937936ebc6bfe19cfa15d855be1c31.Stores
  3. {
  4. /// <summary>
  5. /// This interface must be implemented by classes that will function as a store document.
  6. /// </summary>
  7. public interface IWebDavStoreDocument : IWebDavStoreItem
  8. {
  9. /// <summary>
  10. /// Gets the size of the document in bytes.
  11. /// </summary>
  12. long Size { get; }
  13. /// <summary>
  14. /// Gets the mime type of <see cref="IWebDavStoreItem" />.
  15. /// </summary>
  16. /// <value>
  17. /// The type of the MIME.
  18. /// </value>
  19. string MimeType { get; }
  20. /// <summary>
  21. /// Gets the etag of this <see cref="IWebDavStoreItem" />.
  22. /// </summary>
  23. /// <value>
  24. /// The etag.
  25. /// </value>
  26. string Etag { get; }
  27. /// <summary>
  28. /// Opens a <see cref="Stream" /> object for the document, in read-only mode.
  29. /// </summary>
  30. /// <returns>
  31. /// The <see cref="Stream" /> object that can be read from.
  32. /// </returns>
  33. Stream OpenReadStream();
  34. /// <summary>
  35. /// Opens a <see cref="Stream" /> object for the document, in write-only mode.
  36. /// </summary>
  37. /// <param name="append">
  38. /// A value indicating whether to append to the existing document;
  39. /// if
  40. /// <c>false</c>, the existing content will be dropped.
  41. /// </param>
  42. /// <returns>
  43. /// The <see cref="Stream" /> object that can be written to.
  44. /// </returns>
  45. Stream OpenWriteStream(bool append);
  46. }
  47. }