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
IS3ObjectInfoObject info.
content
stringContent to append.
CopyObjects(IS3ObjectInfo, IS3ObjectInfo)
Copies object to another.
void CopyObjects(IS3ObjectInfo sourceObject, IS3ObjectInfo destObject)
Parameters
sourceObject
IS3ObjectInfoSource object info.
destObject
IS3ObjectInfoDestination object info.
CreateEmptyObject(IS3ObjectInfo)
Creates empty object.
void CreateEmptyObject(IS3ObjectInfo obj)
Parameters
obj
IS3ObjectInfoObject info.
DeleteObject(IS3ObjectInfo)
Deletes object from Amazon S3 storage.
void DeleteObject(IS3ObjectInfo obj)
Parameters
obj
IS3ObjectInfoObject info.
GetInfo(string)
Returns new instance of S3ObjectInfo.
IS3ObjectInfo GetInfo(string path)
Parameters
path
stringPath 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
path
stringPath with file name.
key
boolSpecifies 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
obj
IS3ObjectInfoObject info.
fileMode
FileModeFile mode.
fileAccess
FileAccessFile access.
fileShare
FileShareSharing permissions.
bufferSize
intBuffer 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
stringPath.
type
ObjectTypeEnumSpecifies which objects are returned (files, directories, both).
useFlatListing
boolWhether flat listing is used (all files from all subdirectories all in the result).
lower
boolSpecifies whether path should be lowered inside method.
useCache
boolIndicates 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
IS3ObjectInfoObject info.
Returns
- bool
PutDataFromStreamToObject(IS3ObjectInfo, Stream)
Puts data from stream to Amazon S3 storage.
void PutDataFromStreamToObject(IS3ObjectInfo obj, Stream stream)
Parameters
obj
IS3ObjectInfoObject info.
stream
StreamStream to upload.
PutFileToObject(IS3ObjectInfo, string)
Puts file to Amazon S3 storage.
void PutFileToObject(IS3ObjectInfo obj, string pathToSource)
Parameters
obj
IS3ObjectInfoObject info.
pathToSource
stringPath to source file.
PutTextToObject(IS3ObjectInfo, string)
Puts text to Amazon S3 storage object.
void PutTextToObject(IS3ObjectInfo obj, string content)
Parameters
obj
IS3ObjectInfoObject info.
content
stringContent to add.