Does the .net framework provides async methods for working with the file-system?

前端 未结 5 1662
离开以前
离开以前 2020-12-29 03:48

Does the .net framework has an async built-in library/assembly which allows to work with the file system (e.g. File.ReadAllBytes, File.WriteA

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-29 04:30

    In .NET core (since version 2.0) there are now all the async flavors of corresponding ReadAll/WriteAll/AppendAll methods like:

    File.(Read|Write|Append)All(Text|Lines|Bytes)Async
    

    https://docs.microsoft.com/en-us/dotnet/api/system.io.file.readallbytesasync?view=netcore-2.1

    Unfortunately, they are still missing from .NET standard 2.0.

提交回复
热议问题