Interface ITemporaryFileRepository
Persists temporary files.
Namespace: Umbraco.Cms.Core.Persistence.Repositories
Assembly: Umbraco.Core.dll
Syntax
public interface ITemporaryFileRepository
Methods
View SourceCleanUpOldTempFiles(DateTime)
Removes all temporary files that have its TempFileModel.AvailableUntil lower than a specified time.
Declaration
Task<IEnumerable<Guid>> CleanUpOldTempFiles(DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
DateTime | dateTime |
Returns
Type | Description |
---|---|
Task<IEnumerable<Guid>> | The keys of the delete temporary files. |
DeleteAsync(Guid)
Deletes a temporary file using it's unique key.
Declaration
Task DeleteAsync(Guid key)
Parameters
Type | Name | Description |
---|---|---|
Guid | key | The unique key for the temporary file. |
Returns
Type | Description |
---|---|
Task |
GetAsync(Guid)
Gets a temporary file from its key.
Declaration
Task<TemporaryFileModel> GetAsync(Guid key)
Parameters
Type | Name | Description |
---|---|---|
Guid | key | The unique key of the temporary file. |
Returns
Type | Description |
---|---|
Task<TemporaryFileModel> | The temporary file model if found on that specified key, otherwise null. |
SaveAsync(TemporaryFileModel)
Creates or update a temporary file.
Declaration
Task SaveAsync(TemporaryFileModel model)
Parameters
Type | Name | Description |
---|---|---|
TemporaryFileModel | model | The model for the temporary file |
Returns
Type | Description |
---|---|
Task |