FileSystemInformation.cs 923 B

12345678910111213141516171819202122232425262728293031323334
  1. /* Copyright (C) 2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using Utilities;
  10. namespace SMBLibrary
  11. {
  12. public abstract class FileSystemInformation
  13. {
  14. public abstract void WriteBytes(byte[] buffer, int offset);
  15. public byte[] GetBytes()
  16. {
  17. byte[] buffer = new byte[this.Length];
  18. WriteBytes(buffer, 0);
  19. return buffer;
  20. }
  21. public abstract FileSystemInformationClass FileSystemInformationClass
  22. {
  23. get;
  24. }
  25. public abstract int Length
  26. {
  27. get;
  28. }
  29. }
  30. }