|
| 1 | +using System; |
1 | 2 | using System.Collections.Generic; |
2 | 3 | using System.Threading; |
3 | 4 | using System.Threading.Tasks; |
@@ -37,6 +38,7 @@ public interface IFileSystem |
37 | 38 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
38 | 39 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
39 | 40 | /// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception> |
| 41 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
40 | 42 | public IFile GetFile(string virtualPath); |
41 | 43 |
|
42 | 44 | /// <summary> |
@@ -66,6 +68,7 @@ public interface IFileSystem |
66 | 68 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
67 | 69 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
68 | 70 | /// <exception cref="DirectoryNotFoundException">Thrown if the directory does not exists at the given path.</exception> |
| 71 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
69 | 72 | public IDirectory GetDirectory(string virtualPath); |
70 | 73 |
|
71 | 74 | /// <summary> |
@@ -95,6 +98,7 @@ public interface IFileSystem |
95 | 98 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
96 | 99 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
97 | 100 | /// <exception cref="DirectoryNotFoundException">Thrown if the directory does not exists at the given path.</exception> |
| 101 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
98 | 102 | public IEnumerable<IFile> GetFiles(string virtualPath = ""); |
99 | 103 |
|
100 | 104 | /// <summary> |
@@ -124,6 +128,7 @@ public interface IFileSystem |
124 | 128 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
125 | 129 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
126 | 130 | /// <exception cref="DirectoryNotFoundException">Thrown if the directory does not exists at the given path.</exception> |
| 131 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
127 | 132 | public IEnumerable<IDirectory> GetDirectories(string virtualPath = ""); |
128 | 133 |
|
129 | 134 | /// <summary> |
@@ -152,6 +157,7 @@ public interface IFileSystem |
152 | 157 | /// <exception cref="DuplicateAdapterPrefixException">Thrown when multiple adapters are registered with the same prefix.</exception> |
153 | 158 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
154 | 159 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
| 160 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
155 | 161 | public bool FileExists(string virtualPath); |
156 | 162 |
|
157 | 163 | /// <summary> |
@@ -179,6 +185,7 @@ public interface IFileSystem |
179 | 185 | /// <exception cref="DuplicateAdapterPrefixException">Thrown when multiple adapters are registered with the same prefix.</exception> |
180 | 186 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
181 | 187 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
| 188 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
182 | 189 | public bool DirectoryExists(string virtualPath); |
183 | 190 |
|
184 | 191 | /// <summary> |
@@ -206,6 +213,7 @@ public interface IFileSystem |
206 | 213 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
207 | 214 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
208 | 215 | /// <exception cref="DirectoryExistsException">Thrown if the directory exists at the given path.</exception> |
| 216 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
209 | 217 | public void CreateDirectory(string virtualPath); |
210 | 218 |
|
211 | 219 | /// <summary> |
@@ -233,6 +241,7 @@ public interface IFileSystem |
233 | 241 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
234 | 242 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
235 | 243 | /// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception> |
| 244 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
236 | 245 | public void DeleteFile(string virtualPath); |
237 | 246 |
|
238 | 247 | /// <summary> |
@@ -260,6 +269,7 @@ public interface IFileSystem |
260 | 269 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
261 | 270 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
262 | 271 | /// <exception cref="DirectoryNotFoundException">Thrown if the directory does not exists at the given path.</exception> |
| 272 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
263 | 273 | public void DeleteDirectory(string virtualPath); |
264 | 274 |
|
265 | 275 | /// <summary> |
@@ -288,6 +298,7 @@ public interface IFileSystem |
288 | 298 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
289 | 299 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
290 | 300 | /// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception> |
| 301 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
291 | 302 | public byte[] ReadFile(string virtualPath); |
292 | 303 |
|
293 | 304 | /// <summary> |
@@ -317,6 +328,7 @@ public interface IFileSystem |
317 | 328 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
318 | 329 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
319 | 330 | /// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception> |
| 331 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
320 | 332 | public string ReadTextFile(string virtualPath); |
321 | 333 |
|
322 | 334 | /// <summary> |
@@ -348,6 +360,7 @@ public interface IFileSystem |
348 | 360 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
349 | 361 | /// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception> |
350 | 362 | /// <exception cref="FileExistsException">Thrown if the file exists at the given path and parameter "overwrite" = false.</exception> |
| 363 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
351 | 364 | public void CopyFile(string virtualSourcePath, string virtualDestinationPath, bool overwrite = false); |
352 | 365 |
|
353 | 366 | /// <summary> |
@@ -381,6 +394,7 @@ public interface IFileSystem |
381 | 394 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
382 | 395 | /// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception> |
383 | 396 | /// <exception cref="FileExistsException">Thrown if the file exists at the given path and parameter "overwrite" = false.</exception> |
| 397 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
384 | 398 | public void MoveFile(string virtualSourcePath, string virtualDestinationPath, bool overwrite = false); |
385 | 399 |
|
386 | 400 | /// <summary> |
@@ -413,6 +427,7 @@ public interface IFileSystem |
413 | 427 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
414 | 428 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
415 | 429 | /// <exception cref="FileExistsException">Thrown if the file exists at the given path and parameter "overwrite" = false.</exception> |
| 430 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
416 | 431 | public void WriteFile(string virtualPath, byte[] contents, bool overwrite = false); |
417 | 432 |
|
418 | 433 | /// <summary> |
@@ -444,6 +459,7 @@ public interface IFileSystem |
444 | 459 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
445 | 460 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
446 | 461 | /// <exception cref="FileExistsException">Thrown if the file exists at the given path and parameter "overwrite" = false.</exception> |
| 462 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
447 | 463 | public void WriteFile(string virtualPath, string contents, bool overwrite = false); |
448 | 464 |
|
449 | 465 | /// <summary> |
@@ -474,6 +490,7 @@ public interface IFileSystem |
474 | 490 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
475 | 491 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
476 | 492 | /// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception> |
| 493 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
477 | 494 | public void AppendFile(string virtualPath, byte[] contents); |
478 | 495 |
|
479 | 496 | /// <summary> |
@@ -503,6 +520,7 @@ public interface IFileSystem |
503 | 520 | /// <exception cref="AdapterNotFoundException">Thrown when an adapter could not be found via the provided prefix.</exception> |
504 | 521 | /// <exception cref="PrefixNotFoundInPathException">Thrown when a prefix in the provided path could not be found.</exception> |
505 | 522 | /// <exception cref="FileNotFoundException">Thrown if the file does not exists at the given path.</exception> |
| 523 | + [Obsolete("Method is deprecated, please use the async version instead. Method will be removed in v2.0.")] |
506 | 524 | public void AppendFile(string virtualPath, string contents); |
507 | 525 |
|
508 | 526 | /// <summary> |
|
0 commit comments