An Amazon S3 file system. More...
Public Member Functions | |
AmazonStorage (string bucket, string root="/") | |
Constructs a new instance of AmazonStorage. More... | |
AmazonStorage (string secret, string key, string bucket, string region) | |
Constructs a new instance of AmazonStorage. More... | |
AmazonStorage (string secret, string key, string bucket, string region, string root, string signatureVersion="4") | |
Constructs a new instance of AmazonStorage. More... | |
async Task | CreateFolderAsync (string path, CancellationToken cancellationToken) |
Asynchronously creates new folder. More... | |
async Task | DeleteFileAsync (string path, CancellationToken cancellationToken) |
Asynchronously deletes a file. More... | |
async Task | DeleteFolderAsync (string path, CancellationToken cancellationToken) |
Asynchronously deletes a folder. More... | |
async Task | DeleteFolderAsync (string path, Action< int, int > progressAction, CancellationToken cancellationToken) |
Asynchronously deletes a folder. More... | |
async Task | MoveFileAsync (string srcPath, string destPath, CancellationToken cancellationToken) |
Asynchronously moves a file. More... | |
async Task | MoveFolderAsync (string srcPath, string destPath, CancellationToken cancellationToken) |
Asynchronously moves a folder. More... | |
async Task | MoveFolderAsync (string srcPath, string destPath, Action< int, int > progressAction, CancellationToken cancellationToken) |
Asynchronously moves a folder. More... | |
async Task | CopyFileAsync (string srcPath, string destPath, CancellationToken cancellationToken) |
Asynchronously copies a file. More... | |
async Task< bool > | FileExistsAsync (string path, CancellationToken cancellationToken) |
Asynchronously checks whether a file exists. More... | |
async Task< bool > | FolderExistsAsync (string path, CancellationToken cancellationToken) |
Asynchronously checks whether a folder exists. More... | |
async Task | WriteAsync (Stream fileStream, string path, CancellationToken cancellationToken) |
Asynchronously writes file content. More... | |
async Task< Stream > | ReadAsync (string path, CancellationToken cancellationToken) |
Asynchronously reads file content. More... | |
Task< FolderListResult > | GetFolderInfosAsync (string path, CancellationToken cancellationToken) |
Asynchronously lists folder informations. More... | |
Task< FolderListResult > | GetFolderInfosAsync (IFolderListContinuation folderListContinuation, CancellationToken cancellationToken) |
Asynchronously lists folder informations. More... | |
Task< FileListResult > | GetFileInfosAsync (string path, CancellationToken cancellationToken) |
Asynchronously lists file informations. More... | |
Task< FileListResult > | GetFileInfosAsync (IFileListContinuation fileListContinuation, CancellationToken cancellationToken) |
Asynchronously lists file informations. More... | |
async Task< FolderInfo > | GetFolderInfoAsync (string path, CancellationToken cancellationToken) |
Asychronously gets folder information. More... | |
async Task< FileInfo > | GetFileInfoAsync (string path, CancellationToken cancellationToken) |
Asychronously gets file information. More... | |
Task< string > | GetUrlAsync (string path, CancellationToken cancellationToken) |
Asynchronously gets resource URL. May return null if URL is not available. More... | |
Protected Member Functions | |
virtual AmazonS3Client | createClient () |
Creates AmazonS3Client instance. More... | |
Protected Attributes | |
readonly string | _root |
readonly string | _bucket |
readonly string | _region |
readonly string | _signatureVersion |
readonly AWSCredentials | _credentials |
An Amazon S3 file system.
|
inline |
Constructs a new instance of AmazonStorage.
bucket | A name of the bucket. |
root | A root folder in the S3 account for the file system |
|
inline |
Constructs a new instance of AmazonStorage.
|
inline |
Constructs a new instance of AmazonStorage.
|
inline |
Asynchronously copies a file.
srcPath | A path to the file. |
destPath | A path to the destination file. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inlineprotectedvirtual |
Creates AmazonS3Client instance.
|
inline |
Asynchronously creates new folder.
path | A path to the new folder. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously deletes a file.
path | A path to the file. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously deletes a folder.
path | A path to the folder. |
progressAction | An action fired when progress is updated. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously deletes a folder.
path | A path to the folder. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously checks whether a file exists.
path | A path to the file. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously checks whether a folder exists.
path | A path to the folder. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asychronously gets file information.
path | A path to the file. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously lists file informations.
fileListContinuation | A file list continuation. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously lists file informations.
path | A path to the folder. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asychronously gets folder information.
path | A path to the folder. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously lists folder informations.
folderListContinuation | A folder list continuation. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously lists folder informations.
path | A path to the folder. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously gets resource URL. May return null if URL is not available.
path | A path to the resource. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously moves a file.
srcPath | A path to the file. |
destPath | A path to the destination file. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously moves a folder.
srcPath | A path to the folder. |
destPath | A path to the destination folder. |
progressAction | An action fired when progress is updated. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously moves a folder.
srcPath | A path to the folder. |
destPath | A path to the destination folder. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously reads file content.
path | A path to the file. |
cancellationToken | A cancellation token. |
Implements IFileSystem.
|
inline |
Asynchronously writes file content.
fileStream | A stream with content to write. |
path | A path to the file. |
cancellationToken | A cancellation token. |
Implements IFileSystem.