bool IsDeleted { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsDeleted property indicates whether an asset has been deleted. This can occur if the Delete method has been called on the asset, or if the AbsolutePath property is empty, suggesting the asset no longer exists on disk.

Usage

Use the IsDeleted property to check if an asset is still available or has been removed. This is particularly useful when managing assets dynamically and ensuring that operations are not performed on non-existent assets.

Example

// Example of checking if an asset is deleted
Editor.Asset asset = GetAsset();
if (asset.IsDeleted)
{
    // Handle the deleted asset scenario
    // For example, log a message or remove it from a list
    Log.Warning($"Asset {asset.Name} has been deleted.");
}
else
{
    // Proceed with operations on the asset
    Log.Info($"Asset {asset.Name} is available.");
}