Forum Discussion

niezheti's avatar
niezheti
Copper Contributor
May 08, 2022

关于文件读取

大家好:

请问一下,假如一个文件夹里有上万的文件,当我开发程序,使用方法创建一个文件流时,传入文件的路径,系统找到这个文件是否需要遍历这上万的文件才找到目标文件?

hello everyone:

Excuse me, if there are tens of thousands of files in a folder, when I develop a program and use the method to create a file stream, the path of the incoming file. Does the system need to traverse the tens of thousands of files to find the target file?

4 Replies

  • LanHuang's avatar
    LanHuang
    Former Employee

    Hi niezheti,

    Thanks for posting your issue here.

    However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
    Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
    Best Regards,
    Lan Huang

    • Alexmada40's avatar
      Alexmada40
      Copper Contributor
      Many thanks for posting your problem here. https://apkfl.com/
  • net1515's avatar
    net1515
    Copper Contributor
    应该是调用的windows API 来查找文件的
    • niezheti's avatar
      niezheti
      Copper Contributor
      那系统底层又是如何查找呢?需要遍历这一万个文件吗?

Resources