diff options
| author | Sven Van den brande <sven.vandenbrande@outlook.com> | 2013-10-31 21:46:03 +0100 |
|---|---|---|
| committer | Sven Van den brande <sven.vandenbrande@outlook.com> | 2013-10-31 21:46:03 +0100 |
| commit | e8f8d6651c86b3fd3350a5afae1d759fbbad06bd (patch) | |
| tree | 6496b1525f0dfc448f0250f4fddaa634296ae94b /MediaBrowser.Common/IO/IFileSystem.cs | |
| parent | 28ab28768a307d1cac60ebe79163b98291068cde (diff) | |
| parent | 882d0681e68c5e0ae663cca75752e4df765c8dd5 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Common/IO/IFileSystem.cs')
| -rw-r--r-- | MediaBrowser.Common/IO/IFileSystem.cs | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/MediaBrowser.Common/IO/IFileSystem.cs b/MediaBrowser.Common/IO/IFileSystem.cs new file mode 100644 index 000000000..d307b74e5 --- /dev/null +++ b/MediaBrowser.Common/IO/IFileSystem.cs @@ -0,0 +1,78 @@ +using System; +using System.IO; + +namespace MediaBrowser.Common.IO +{ + /// <summary> + /// Interface IFileSystem + /// </summary> + public interface IFileSystem + { + /// <summary> + /// Determines whether the specified filename is shortcut. + /// </summary> + /// <param name="filename">The filename.</param> + /// <returns><c>true</c> if the specified filename is shortcut; otherwise, <c>false</c>.</returns> + bool IsShortcut(string filename); + + /// <summary> + /// Resolves the shortcut. + /// </summary> + /// <param name="filename">The filename.</param> + /// <returns>System.String.</returns> + string ResolveShortcut(string filename); + + /// <summary> + /// Creates the shortcut. + /// </summary> + /// <param name="shortcutPath">The shortcut path.</param> + /// <param name="target">The target.</param> + void CreateShortcut(string shortcutPath, string target); + + /// <summary> + /// Gets the file system info. + /// </summary> + /// <param name="path">The path.</param> + /// <returns>FileSystemInfo.</returns> + FileSystemInfo GetFileSystemInfo(string path); + + /// <summary> + /// Gets the valid filename. + /// </summary> + /// <param name="filename">The filename.</param> + /// <returns>System.String.</returns> + string GetValidFilename(string filename); + + /// <summary> + /// Gets the creation time UTC. + /// </summary> + /// <param name="info">The info.</param> + /// <returns>DateTime.</returns> + DateTime GetCreationTimeUtc(FileSystemInfo info); + + /// <summary> + /// Gets the last write time UTC. + /// </summary> + /// <param name="info">The information.</param> + /// <returns>DateTime.</returns> + DateTime GetLastWriteTimeUtc(FileSystemInfo info); + + /// <summary> + /// Gets the last write time UTC. + /// </summary> + /// <param name="path">The path.</param> + /// <returns>DateTime.</returns> + DateTime GetLastWriteTimeUtc(string path); + + /// <summary> + /// Gets the file stream. + /// </summary> + /// <param name="path">The path.</param> + /// <param name="mode">The mode.</param> + /// <param name="access">The access.</param> + /// <param name="share">The share.</param> + /// <param name="isAsync">if set to <c>true</c> [is asynchronous].</param> + /// <returns>FileStream.</returns> + FileStream GetFileStream(string path, FileMode mode, FileAccess access, FileShare share, bool isAsync = false); + } +} |
