Re请问,是否能够通过.netsdk创建文件夹
/// <summary>
/// 创建空目录
/// </summary>
/// <param name="bucketName">Bucket名称</param>
/// <param name="key">目录名称,须以斜杠结束</param>
/// <returns></returns>
public static string CreateFolder(string bucketName, string key)
{
string strRs = null;
try
{
using (io.MemoryStream frmMS = new io.MemoryStream())
{
strRs = OssHelper._CreateOssClient().PutObject(bucketName, key, frmMS).ETag;
}
}
catch (OssException oe)
{
OssHelper._WriteLog(oe);
}
catch (Exception e)
{
OssHelper._WriteLog(e);
}
return strRs;
}