public async Task Blobs_list_files_in_a_folder() { IBlobStorageProvider storage = StorageFactory.Blobs.AmazonS3BlobStorage( _settings.AwsAccessKeyId, _settings.AwsSecretAccessKey, _settings.AwsTestBucketName); await storage.WriteAsync("folder1/file1", Generator.RandomString.ToMemoryStream(), false); await storage.WriteAsync("folder1/file2", Generator.RandomString.ToMemoryStream(), false); await storage.WriteAsync("folder2/file1", Generator.RandomString.ToMemoryStream(), false); BlobId[] folderBlobs = (await storage.ListAsync(new ListOptions { FolderPath = "folder1", Recurse = true })).ToArray(); }
public async Task List_All_DoesntCrash() { List <BlobId> allBlobNames = (await _provider.ListAsync(new ListOptions { Recurse = true })).ToList(); }
/// <summary> /// Returns the list of available blobs /// </summary> /// <param name="options"></param> /// <param name="cancellationToken"></param> /// <returns>List of blob IDs</returns> public Task <IEnumerable <BlobId> > ListAsync(ListOptions options, CancellationToken cancellationToken = default(CancellationToken)) { return(_provider.ListAsync(options, cancellationToken)); }