Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions FileSystem/src/IFileSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -37,6 +38,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public IFile GetFile(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -66,6 +68,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="DirectoryNotFoundException">Thrown if the directory does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public IDirectory GetDirectory(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -95,6 +98,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="DirectoryNotFoundException">Thrown if the directory does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public IEnumerable<IFile> GetFiles(string virtualPath = "");

/// <summary>
Expand Down Expand Up @@ -124,6 +128,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="DirectoryNotFoundException">Thrown if the directory does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public IEnumerable<IDirectory> GetDirectories(string virtualPath = "");

/// <summary>
Expand Down Expand Up @@ -152,6 +157,7 @@ public interface IFileSystem
/// <exception cref="DuplicateAdapterPrefixException">Thrown when multiple adapters are registered with the same prefix.</exception>
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public bool FileExists(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -179,6 +185,7 @@ public interface IFileSystem
/// <exception cref="DuplicateAdapterPrefixException">Thrown when multiple adapters are registered with the same prefix.</exception>
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public bool DirectoryExists(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -206,6 +213,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="DirectoryExistsException">Thrown if the directory exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void CreateDirectory(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -233,6 +241,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void DeleteFile(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -260,6 +269,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="DirectoryNotFoundException">Thrown if the directory does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void DeleteDirectory(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -288,6 +298,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public byte[] ReadFile(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -317,6 +328,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public string ReadTextFile(string virtualPath);

/// <summary>
Expand Down Expand Up @@ -348,6 +360,7 @@ public interface IFileSystem
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception>
/// <exception cref="FileExistsException">Thrown if the file exists at the given path and parameter "overwrite" = false.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void CopyFile(string virtualSourcePath, string virtualDestinationPath, bool overwrite = false);

/// <summary>
Expand Down Expand Up @@ -381,6 +394,7 @@ public interface IFileSystem
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception>
/// <exception cref="FileExistsException">Thrown if the file exists at the given path and parameter "overwrite" = false.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void MoveFile(string virtualSourcePath, string virtualDestinationPath, bool overwrite = false);

/// <summary>
Expand Down Expand Up @@ -413,6 +427,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileExistsException">Thrown if the file exists at the given path and parameter "overwrite" = false.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void WriteFile(string virtualPath, byte[] contents, bool overwrite = false);

/// <summary>
Expand Down Expand Up @@ -444,6 +459,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileExistsException">Thrown if the file exists at the given path and parameter "overwrite" = false.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void WriteFile(string virtualPath, string contents, bool overwrite = false);

/// <summary>
Expand Down Expand Up @@ -474,6 +490,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void AppendFile(string virtualPath, byte[] contents);

/// <summary>
Expand Down Expand Up @@ -503,6 +520,7 @@ public interface IFileSystem
/// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception>
/// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception>
/// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception>
[Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")]
public void AppendFile(string virtualPath, string contents);

/// <summary>
Expand Down