The system cannot find the path specified

前端 未结 4 1417
轮回少年
轮回少年 2020-12-19 17:24

I am trying to calculate sha1 hash for some of the files from location %system%\\drivers\\ using C#. I know files are at the exact location but when i use

F         


        
4条回答
  •  死守一世寂寞
    2020-12-19 18:27

    From http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx:

    The Exists method returns false if any error occurs while trying to determine if the specified file exists. This can occur in situations that raise exceptions such as passing a file name with invalid characters or too many characters, a failing or missing disk, or if the caller does not have permission to read the file.

提交回复
热议问题