请问,是否能够通过.netsdk创建文件夹
Re请问,是否能够通过.netsdk创建文件夹
///
/// 创建空目录
///
/// Bucket名称
/// 目录名称,须以斜杠结束
///
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;
}
赞0
踩0