IWebDAVStoreDocument.cs 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. using System.IO;
  2. namespace WebDAVSharp.Server.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. /// Opens a <see cref="Stream" /> object for the document, in read-only mode.
  11. /// </summary>
  12. /// <returns>
  13. /// The <see cref="Stream" /> object that can be read from.
  14. /// </returns>
  15. Stream OpenReadStream();
  16. /// <summary>
  17. /// Opens a <see cref="Stream" /> object for the document, in write-only mode.
  18. /// </summary>
  19. /// <param name="append">
  20. /// A value indicating whether to append to the existing document;
  21. /// if
  22. /// <c>false</c>, the existing content will be dropped.
  23. /// </param>
  24. /// <returns>
  25. /// The <see cref="Stream" /> object that can be written to.
  26. /// </returns>
  27. Stream OpenWriteStream(bool append);
  28. }
  29. }