12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- namespace Utilities
- {
- public interface IFileSystem
- {
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- IFileSystemEntry GetEntry(string path);
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.DirectoryNotFoundException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- IFileSystemEntry CreateFile(string path);
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.DirectoryNotFoundException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- IFileSystemEntry CreateDirectory(string path);
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.DirectoryNotFoundException"></exception>
- /// <exception cref="System.IO.FileNotFoundException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- void Move(string source, string destination);
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.DirectoryNotFoundException"></exception>
- /// <exception cref="System.IO.FileNotFoundException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- void Delete(string path);
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.DirectoryNotFoundException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- List<IFileSystemEntry> ListEntriesInDirectory(string path);
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.DirectoryNotFoundException"></exception>
- /// <exception cref="System.IO.FileNotFoundException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- Stream OpenFile(string path, FileMode mode, FileAccess access, FileShare share, FileOptions options);
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.FileNotFoundException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- void SetAttributes(string path, bool? isHidden, bool? isReadonly, bool? isArchived);
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.IO.FileNotFoundException"></exception>
- /// <exception cref="System.IO.IOException"></exception>
- /// <exception cref="System.UnauthorizedAccessException"></exception>
- void SetDates(string path, DateTime? creationDT, DateTime? lastWriteDT, DateTime? lastAccessDT);
- string Name
- {
- get;
- }
- /// <exception cref="System.IO.IOException"></exception>
- long Size
- {
- get;
- }
- /// <exception cref="System.IO.IOException"></exception>
- long FreeSpace
- {
- get;
- }
- }
- }
|