WebDavMtpStoreDocument.cs 911 B

1234567891011121314151617181920212223242526272829303132
  1. using System.Diagnostics;
  2. using System.IO;
  3. using Mtp2Dav.WebDAVSharp.Server._1d2086a502937936ebc6bfe19cfa15d855be1c31.Stores;
  4. namespace Mtp2Dav.MtpStore._1d2086a502937936ebc6bfe19cfa15d855be1c31
  5. {
  6. [DebuggerDisplay("File ({ItemPath})")]
  7. internal class WebDavMtpStoreDocument : WebDavMtpStoreItem, IWebDavStoreDocument
  8. {
  9. public WebDavMtpStoreDocument(WebDavMtpStore store, string path) : base(store, path)
  10. {
  11. }
  12. public override bool IsCollection => false;
  13. public long Size => (long)(FileInfo?.Length ?? 0);
  14. //----------------
  15. public string MimeType { get; }
  16. public string Etag { get; }
  17. public Stream OpenReadStream()
  18. {
  19. return Store.OpenReadStream(ItemPath);
  20. }
  21. public Stream OpenWriteStream(bool append)
  22. {
  23. throw new System.NotImplementedException();
  24. }
  25. }
  26. }