Table of Contents

Class S3ObjectInfo

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

Represents S3 object.

public class S3ObjectInfo : IS3ObjectInfo
Inheritance
object
S3ObjectInfo
Implements
Extension Methods

Constructors

S3ObjectInfo(string)

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

public S3ObjectInfo(string path)

Parameters

path string

Path to the file name.

S3ObjectInfo(string, bool)

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

public S3ObjectInfo(string path, bool key)

Parameters

path string

Path with file name.

key bool

Specifies that given path is already object key.

Fields

METADATA_EXT

Extension for metadata objects.

public const string METADATA_EXT = ".meta"

Field Value

string

METADATA_FOLDER

Metadata folder.

public const string METADATA_FOLDER = "__metadata/"

Field Value

string

STORAGE_KEY

Storage key for Amazon storage objects.

public const string STORAGE_KEY = "AmazonStorage|S3ObjectInfo|"

Field Value

string

Properties

ETag

Returns E-tag from the object.

public string ETag { get; set; }

Property Value

string

IsDirectory

Gets whether current object is directory.

public bool IsDirectory { get; }

Property Value

bool

IsLocked

Returns whether current object is locked.

public bool IsLocked { get; }

Property Value

bool

Key

Gets or sets object key.

public string Key { get; set; }

Property Value

string

Length

Gets or sets content length of the object.

public long Length { get; set; }

Property Value

long

Methods

DeleteMetadataFile()

Deletes metadata file.

public void DeleteMetadataFile()

Exists()

Returns whether object exists.

public bool Exists()

Returns

bool

GetMetadata(string)

Returns object meta data.

public string GetMetadata(string key)

Parameters

key string

Metadata key.

Returns

string

Lock()

Locks current object.

public void Lock()

SetMetadata(string, string)

Sets meta data to object.

public void SetMetadata(string key, string value)

Parameters

key string

MetaData key.

value string

Metadata value.

SetMetadata(string, string, bool)

Sets meta data to object.

public void SetMetadata(string key, string value, bool update)

Parameters

key string

MetaData key.

value string

Metadata value.

update bool

Indicates whether data are updated in S3 storage.

UnLock()

Unlocks current object.

public void UnLock()