aliyun/aliyun-oss-csharp-sdk

How to create and delete a directory in a bucket?

Opened this issue ยท 1 comments

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

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 ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚