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

# Class BaseArchive

> **Inheritance:** `System.Object` -> BaseArchive

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

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

```csharp title="Syntax"
public abstract class BaseArchive : IDisposable
```

## Implements

* `Aurigma.DesignAtoms.Cache.Abstractions.Interfaces.ISerializableStorage`
* `System.IDisposable`

## Inherited Members

* `System.Object.ToString`
* `System.Object.Equals(System.Object)`
* `System.Object.Equals(System.Object,System.Object)`
* `System.Object.ReferenceEquals(System.Object,System.Object)`
* `System.Object.GetHashCode`
* `System.Object.GetType`
* `System.Object.MemberwiseClone`

## Constructors

### BaseArchive

```csharp
protected BaseArchive()
```

## Methods

### AddFileWithId

```csharp
public void AddFileWithId(string fileId, string filePath, bool isSource = false)
```

##### Parameters

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

### AddFileWithId

```csharp
public abstract void AddFileWithId(string fileId, Stream fileData, bool isSource = false)
```

##### Parameters

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

### GetReadStream

```csharp
public abstract Stream GetReadStream(string fileId, bool isSource = false)
```

##### Parameters

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

##### Returns

`System.IO.Stream`

### FileExists

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

##### Parameters

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

##### Returns

`System.Boolean`

### UpdateLastAccessTime

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

##### Parameters

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

### WriteToStream

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

##### Parameters

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

### Dispose

```csharp
public abstract void Dispose()
```

### GetFileList

```csharp
public abstract string[] GetFileList()
```

##### Returns

`System.String[]`

### GetFileList

```csharp
public string[] GetFileList(string path)
```

##### Parameters

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

##### Returns

`System.String[]`

### CreateArchive

```csharp
public static BaseArchive CreateArchive(Stream stream)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *stream* |  |

##### Returns

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