Class ContentElement
The content element class.
Inherited Members
Namespace: Evergine.Assets.Contents
Assembly: Evergine.Assets.dll
Syntax
public abstract class ContentElement
Properties
DirtyPath
Gets or sets a value indicating whether the path is dirty and needs to be recalculated.
Declaration
public virtual bool DirtyPath { get; set; }
Property Value
Type | Description |
---|---|
bool |
FullPath
Gets the full content path.
Declaration
public abstract string FullPath { get; }
Property Value
Type | Description |
---|---|
string |
LastModified
Gets the latest modified time.
Declaration
public abstract DateTime LastModified { get; }
Property Value
Type | Description |
---|---|
DateTime |
Name
Gets the content name.
Declaration
public virtual string Name { get; }
Property Value
Type | Description |
---|---|
string |
ParentDirectory
Gets the content directory.
Declaration
public virtual ContentDirectory ParentDirectory { get; }
Property Value
Type | Description |
---|---|
ContentDirectory |
RelativePath
Gets the content path.
Declaration
public string RelativePath { get; }
Property Value
Type | Description |
---|---|
string |
Methods
Delete()
Deletes the element.
Declaration
public abstract void Delete()
Move(ContentDirectory)
Moves the element to a new directory.
Declaration
public virtual bool Move(ContentDirectory newParentDirectory)
Parameters
Type | Name | Description |
---|---|---|
ContentDirectory | newParentDirectory | The new parent Content Directory. |
Returns
Type | Description |
---|---|
bool | True if it was successful. |
Refresh()
Refreshes the element, setting its path to dirty mode.
Declaration
public virtual void Refresh()
SetName(string)
Sets the name of the element.
Declaration
public virtual bool SetName(string newName)
Parameters
Type | Name | Description |
---|---|---|
string | newName | The new name of the element. |
Returns
Type | Description |
---|---|
bool | True if it was possible to change its name. |
UpdateName(string)
Updates the name of the element.
Declaration
public virtual bool UpdateName(string newName)
Parameters
Type | Name | Description |
---|---|---|
string | newName | The new name of the element. |
Returns
Type | Description |
---|---|
bool | True if the operation was succesful. False otherwise. |