Is there an async version of DirectoryInfo.GetFiles / Directory.GetDirectories in dotNet?

前端 未结 7 2140
北荒
北荒 2020-12-08 06:50

Is there an asynchronous version of DirectoryInfo.GetFiles / Directory.GetDirectories in dotNet? I\'d like to use them in an F# async block, and it\'d be nice to have a ver

7条回答
  •  臣服心动
    2020-12-08 07:18

    No, I don't think there is. The pool thread approach is probably the most pragmatic. Alternatively, I guess you could drop down to P/Invoke - but that would be a lot more work.

提交回复
热议问题