Table of Contents

Interface ITemporaryFileStorage

Namespace
GroupeIsa.Neos.Shared.IO
Assembly
GroupeIsa.Neos.Shared.dll

Provides the functionalities to store temporary files.

public interface ITemporaryFileStorage

Methods

AddAsync(BinaryFile)

Adds a file to the temporary storage.

Task<Guid> AddAsync(BinaryFile file)

Parameters

file BinaryFile

The File.

Returns

Task<Guid>

The file identifier of the added file.

DeleteAsync(Guid)

Deletes a file in the temporary storage.

Task DeleteAsync(Guid guid)

Parameters

guid Guid

The file identifier.

Returns

Task

A Task representing the asynchronous operation.

ExistsAsync(Guid)

Gets a value indicating whether the file exists or not.

Task<bool> ExistsAsync(Guid guid)

Parameters

guid Guid

The file identifier.

Returns

Task<bool>

True if the file exists, false otherwise.

FindAsync(Guid)

Finds a file in the temporary storage.

Task<BinaryFile?> FindAsync(Guid guid)

Parameters

guid Guid

The file identifier.

Returns

Task<BinaryFile>

The file or null.

GetAsync(Guid)

Gets a file from the temporary storage.

Task<BinaryFile> GetAsync(Guid guid)

Parameters

guid Guid

The file identifier.

Returns

Task<BinaryFile>

The file.

GetListAsync(Expression<Func<BinaryFile, bool>>?, Expression<Func<string?, bool>>?, bool)

Gets files from the temporary storage.

Task<IList<BinaryFile>> GetListAsync(Expression<Func<BinaryFile, bool>>? filePredicate = null, Expression<Func<string?, bool>>? userIdPredicate = null, bool loadContent = false)

Parameters

filePredicate Expression<Func<BinaryFile, bool>>

File predicate.

userIdPredicate Expression<Func<string, bool>>

User id predicate.

loadContent bool

A value indicating whether the content should be loaded or not.

Returns

Task<IList<BinaryFile>>

The files.