I'm trying to get files names in sub-directories in a directory in AWS Bucket. I can get the sub-directories name but I don't know how to list the files under the sub-directory.
The following code get the sub-directories name but the files names in those sub-directories
var accessKey = "my key";
var secretKey = "my secret key";
IAmazonS3 client = new AmazonS3Client(accessKey, secretKey, RegionEndpoint.USEast1);
S3DirectoryInfo dir = new S3DirectoryInfo(client, "mybucketname", "foldername");
foreach (IS3FileSystemInfo file in dir.GetFileSystemInfos())
{
filename= file.Name;
}
Thanks