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
objIS3ObjectInfoObject info.
contentstringContent to append.
CopyObjects(IS3ObjectInfo, IS3ObjectInfo)
Copies object to another.
void CopyObjects(IS3ObjectInfo sourceObject, IS3ObjectInfo destObject)
Parameters
sourceObjectIS3ObjectInfoSource object info.
destObjectIS3ObjectInfoDestination object info.
CreateEmptyObject(IS3ObjectInfo)
Creates empty object.
void CreateEmptyObject(IS3ObjectInfo obj)
Parameters
objIS3ObjectInfoObject info.
DeleteObject(IS3ObjectInfo)
Deletes object from Amazon S3 storage.
void DeleteObject(IS3ObjectInfo obj)
Parameters
objIS3ObjectInfoObject info.
GetInfo(string)
Returns new instance of S3ObjectInfo.
IS3ObjectInfo GetInfo(string path)
Parameters
pathstringPath with file name.
Returns
GetInfo(string, bool)
Initializes new instance of S3 object info with specified bucket name.
IS3ObjectInfo GetInfo(string path, bool key)
Parameters
pathstringPath with file name.
keyboolSpecifies that given path is already object key.
Returns
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
objIS3ObjectInfoObject info.
fileModeFileModeFile mode.
fileAccessFileAccessFile access.
fileShareFileShareSharing permissions.
bufferSizeintBuffer 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
pathstringPath.
typeObjectTypeEnumSpecifies which objects are returned (files, directories, both).
useFlatListingboolWhether flat listing is used (all files from all subdirectories all in the result).
lowerboolSpecifies whether path should be lowered inside method.
useCacheboolIndicates 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
objIS3ObjectInfoObject info.
Returns
- bool
PutDataFromStreamToObject(IS3ObjectInfo, Stream)
Puts data from stream to Amazon S3 storage.
void PutDataFromStreamToObject(IS3ObjectInfo obj, Stream stream)
Parameters
objIS3ObjectInfoObject info.
streamStreamStream to upload.
PutFileToObject(IS3ObjectInfo, string)
Puts file to Amazon S3 storage.
void PutFileToObject(IS3ObjectInfo obj, string pathToSource)
Parameters
objIS3ObjectInfoObject info.
pathToSourcestringPath to source file.
PutTextToObject(IS3ObjectInfo, string)
Puts text to Amazon S3 storage object.
void PutTextToObject(IS3ObjectInfo obj, string content)
Parameters
objIS3ObjectInfoObject info.
contentstringContent to add.