1

我正在使用 REST API v1 来获取订单。这是我传递的 URL:

www.xxx.com.au/wc-api/v1/orders?filter%5Blimit%5D=2000&oauth_consumer_key=ck_f21cdxxxdca2370421791b6414e7efa974c7da31&oauth_timestamp=1478485935&oauth_nonce=8A4FC4E3EF48D6AF0C00580FDFA6BCAB6BB77E55&oauth_signature_method=HMAC-SHA256&oauth_signature=dosA4Lz7Yjw8g%2bElzQYBZQprGhwMrGHtLGU2usOk6F8%3d

但不幸的是,我遇到了这个错误:

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

我正在使用 c# ASP.NET。

4

1 回答 1

1

Zeta Long Paths库用于在访问文件和文件夹时处理长文件名,它还提供了几个类和函数来对超过 260 个字符的“MAX_PATH”限制的文件路径和文件夹路径执行基本功能。

var folderPath = new ZetaDirectoryInfo(YourLongURL);

foreach ( var filePath in folderPath.GetFiles() )
{
    Console.Write( "File {0} has a size of {1}", 
        filePath.FullName, 
        filePath.Length );
}

你也可以看看path too long 异常

于 2016-11-07T03:31:17.433 回答