aliyun / aliyun-oss-csharp-sdk

Aliyun OSS SDK for C#
MIT License
379 stars 204 forks source link

How to create and delete a directory in a bucket? #112

Open dev-ptdi opened 4 years ago

dev-ptdi commented 4 years ago

Hi,

How to create and delete a directory in a bucket? I did not find such method in SDK.

please help

many thanks

XgHao commented 2 years ago

I have the same question today. No such method is provided in dot net SDK . But you can refer to java SDK I just want to create a directory, so I do this

var path = "myDir";
var fileName = "file.txt";
var ossObjectKey = $"{path}/{fileName}";
OssClient.PutObject(..., ossObjectKey, ...);

It's work!

Unfortunately, today is 2022 😂😂😂