Table of Contents

Interface IS3ObjectInfoProvider

Namespace
Kentico.Xperience.AmazonStorage
Assembly
Kentico.Xperience.AmazonStorage.dll

Interface of the S3ObjectInfoProvider

public interface IS3ObjectInfoProvider
Extension Methods

Methods

AppendTextToObject(IS3ObjectInfo, string)

Appends text to Amazon S3 storage object.

void AppendTextToObject(IS3ObjectInfo obj, string content)

Parameters

obj IS3ObjectInfo

Object info.

content string

Content to append.

CopyObjects(IS3ObjectInfo, IS3ObjectInfo)

Copies object to another.

void CopyObjects(IS3ObjectInfo sourceObject, IS3ObjectInfo destObject)

Parameters

sourceObject IS3ObjectInfo

Source object info.

destObject IS3ObjectInfo

Destination object info.

CreateEmptyObject(IS3ObjectInfo)

Creates empty object.

void CreateEmptyObject(IS3ObjectInfo obj)

Parameters

obj IS3ObjectInfo

Object info.

DeleteObject(IS3ObjectInfo)

Deletes object from Amazon S3 storage.

void DeleteObject(IS3ObjectInfo obj)

Parameters

obj IS3ObjectInfo

Object info.

GetInfo(string)

Returns new instance of S3ObjectInfo.

IS3ObjectInfo GetInfo(string path)

Parameters

path string

Path with file name.

Returns

IS3ObjectInfo

GetInfo(string, bool)

Initializes new instance of S3 object info with specified bucket name.

IS3ObjectInfo GetInfo(string path, bool key)

Parameters

path string

Path with file name.

key bool

Specifies that given path is already object key.

Returns

IS3ObjectInfo

GetObjectContent(IS3ObjectInfo, FileMode, FileAccess, FileShare, int)

Returns object content as a CMS.IO.Stream.

Stream GetObjectContent(IS3ObjectInfo obj, FileMode fileMode = FileMode.Open, FileAccess fileAccess = FileAccess.Read, FileShare fileShare = FileShare.Read, int bufferSize = 4096)

Parameters

obj IS3ObjectInfo

Object info.

fileMode FileMode

File mode.

fileAccess FileAccess

File access.

fileShare FileShare

Sharing permissions.

bufferSize int

Buffer size.

Returns

Stream

GetObjectsList(string, ObjectTypeEnum, bool, bool, bool)

Returns list with objects from given bucket and under given path.

List<string> GetObjectsList(string path, ObjectTypeEnum type, bool useFlatListing = false, bool lower = true, bool useCache = true)

Parameters

path string

Path.

type ObjectTypeEnum

Specifies which objects are returned (files, directories, both).

useFlatListing bool

Whether flat listing is used (all files from all subdirectories all in the result).

lower bool

Specifies whether path should be lowered inside method.

useCache bool

Indicates if results should be primary taken from cache to get better performance

Returns

List<string>

Remarks

In order to allow to distinguish between files and directories, directories are listed with a trailing backslash.

ObjectExists(IS3ObjectInfo)

Returns whether object exists.

bool ObjectExists(IS3ObjectInfo obj)

Parameters

obj IS3ObjectInfo

Object info.

Returns

bool

PutDataFromStreamToObject(IS3ObjectInfo, Stream)

Puts data from stream to Amazon S3 storage.

void PutDataFromStreamToObject(IS3ObjectInfo obj, Stream stream)

Parameters

obj IS3ObjectInfo

Object info.

stream Stream

Stream to upload.

PutFileToObject(IS3ObjectInfo, string)

Puts file to Amazon S3 storage.

void PutFileToObject(IS3ObjectInfo obj, string pathToSource)

Parameters

obj IS3ObjectInfo

Object info.

pathToSource string

Path to source file.

PutTextToObject(IS3ObjectInfo, string)

Puts text to Amazon S3 storage object.

void PutTextToObject(IS3ObjectInfo obj, string content)

Parameters

obj IS3ObjectInfo

Object info.

content string

Content to add.