---
title: "Interface IFileStorage | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.FileStorage/IFileStorage/"
---

# Interface IFileStorage

> * `System.IDisposable.Dispose`

###### **Namespace**: [Aurigma.DesignAtoms.Storage.FileStorage](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.FileStorage.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public interface IFileStorage : IDisposable
```

## Inherited Members

## Methods

### AddFile

```csharp
string AddFile(string filePath)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *filePath* |  |

##### Returns

`System.String`

### AddFile

```csharp
string AddFile(string extension, Stream fileData)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *extension* |  |
| `System.IO.Stream` | *fileData* |  |

##### Returns

`System.String`

### AddFileWithId

```csharp
void AddFileWithId(string fileId, string filePath)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |
| `System.String` | *filePath* |  |

### AddFileWithId

```csharp
void AddFileWithId(string fileId, Stream fileData)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |
| `System.IO.Stream` | *fileData* |  |

### GetReadStream

```csharp
Stream GetReadStream(string fileId)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |

##### Returns

`System.IO.Stream`

### WriteToStream

```csharp
void WriteToStream(string fileId, Action<Stream> action)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |
| `System.Action<System.IO.Stream>` | *action* |  |

### RemoveFile

```csharp
bool RemoveFile(string fileId)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |

##### Returns

`System.Boolean`

### RemoveFilesByPrefix

```csharp
IEnumerable<string> RemoveFilesByPrefix(string prefix)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *prefix* |  |

##### Returns

`System.Collections.Generic.IEnumerable<System.String>`

### FileExists

```csharp
bool FileExists(string fileId)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |

##### Returns

`System.Boolean`

### UpdateLastAccessTime

```csharp
void UpdateLastAccessTime(string fileId)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |

### GetInfo

```csharp
CacheFileInfo GetInfo(string fileId)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |

##### Returns

`Aurigma.DesignAtoms.Cache.Abstractions.Models.CacheFileInfo`
