Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 2.37 KB

DIRECTORY_OPERATIONS.md

File metadata and controls

9 lines (8 loc) · 2.37 KB

Directory Operations

Method Name Description How to Use Example
CreateDirectoryAsync Creates a directory in an S3 bucket. Provide the bucket name, directory path, and a cancellation token. await directoryOperations.CreateDirectoryAsync("bucket-name", "directory-path", cancellationToken);
DeleteDirectoryAsync Deletes a directory and all its contents from an S3 bucket. Provide the bucket name, directory path, and a cancellation token. await directoryOperations.DeleteDirectoryAsync("bucket-name", "directory-path", cancellationToken);
ListDirectoriesAsync Lists all directories in a parent directory in an S3 bucket. Provide the bucket name, parent directory path, and a cancellation token. Returns an enumerable of directory paths. var directories = await directoryOperations.ListDirectoriesAsync("bucket-name", "parent-directory-path", cancellationToken);
EmptyDirectoryAsync Deletes all objects in a directory in an S3 bucket. Provide the bucket name, directory path, and a cancellation token. await directoryOperations.EmptyDirectoryAsync("bucket-name", "directory-path", cancellationToken);
DirectoryExistsAsync Checks if a directory exists in an S3 bucket. Provide the bucket name, directory path, and a cancellation token. Returns a boolean indicating whether the directory exists. var directoryExists = await directoryOperations.DirectoryExistsAsync("bucket-name", "directory-path", cancellationToken);