IFileSystem.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.IO;
  3. namespace MediaBrowser.Controller.IO
  4. {
  5. /// <summary>
  6. /// Interface IFileSystem
  7. /// </summary>
  8. public interface IFileSystem
  9. {
  10. /// <summary>
  11. /// Determines whether the specified filename is shortcut.
  12. /// </summary>
  13. /// <param name="filename">The filename.</param>
  14. /// <returns><c>true</c> if the specified filename is shortcut; otherwise, <c>false</c>.</returns>
  15. bool IsShortcut(string filename);
  16. /// <summary>
  17. /// Resolves the shortcut.
  18. /// </summary>
  19. /// <param name="filename">The filename.</param>
  20. /// <returns>System.String.</returns>
  21. string ResolveShortcut(string filename);
  22. /// <summary>
  23. /// Creates the shortcut.
  24. /// </summary>
  25. /// <param name="shortcutPath">The shortcut path.</param>
  26. /// <param name="target">The target.</param>
  27. void CreateShortcut(string shortcutPath, string target);
  28. /// <summary>
  29. /// Gets the file system info.
  30. /// </summary>
  31. /// <param name="path">The path.</param>
  32. /// <returns>FileSystemInfo.</returns>
  33. FileSystemInfo GetFileSystemInfo(string path);
  34. /// <summary>
  35. /// Gets the valid filename.
  36. /// </summary>
  37. /// <param name="filename">The filename.</param>
  38. /// <returns>System.String.</returns>
  39. string GetValidFilename(string filename);
  40. /// <summary>
  41. /// Gets the creation time UTC.
  42. /// </summary>
  43. /// <param name="info">The info.</param>
  44. /// <returns>DateTime.</returns>
  45. DateTime GetCreationTimeUtc(FileSystemInfo info);
  46. }
  47. }