PathTooLongException in C# code

前端 未结 4 1702
攒了一身酷
攒了一身酷 2020-12-07 04:38

i have the following code:

 public static void Serialize()
    {

        List dirs = FileHelper.GetFilesRecursive(fileDirectoryPath);
                 


        
4条回答
  •  無奈伤痛
    2020-12-07 04:44

    .NET doesn't support Unicode file paths, so the only option I know of in this case is using P/Invoke (unless, of course, you can change the path) to call Win32 API functions that do support them. You can look here for instructions on how to use Unicode file path to break the 260 characters barrier.

提交回复
热议问题