IFileSystem.cs 937 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. namespace Utilities
  5. {
  6. public interface IFileSystem
  7. {
  8. FileSystemEntry GetEntry(string path);
  9. FileSystemEntry CreateFile(string path);
  10. FileSystemEntry CreateDirectory(string path);
  11. void Move(string source, string destination);
  12. void Delete(string path);
  13. List<FileSystemEntry> ListEntriesInDirectory(string path);
  14. Stream OpenFile(string path, FileMode mode, FileAccess access, FileShare share);
  15. void SetAttributes(string path, bool? isHidden, bool? isReadonly, bool? isArchived);
  16. void SetDates(string path, DateTime? creationDT, DateTime? lastWriteDT, DateTime? lastAccessDT);
  17. string Name
  18. {
  19. get;
  20. }
  21. long Size
  22. {
  23. get;
  24. }
  25. long FreeSpace
  26. {
  27. get;
  28. }
  29. }
  30. }