# FileGrainStorage Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.persistence.filestorage.filegrainstorage/)

## FileGrainStorage(string, FileGrainStorageOptions, IOptions&lt;ClusterOptions&gt;, IActivatorProvider) {#constructor-string-orleans-persistence-filestorage-filegrainstorageoptions-micro-589746e8}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.persistence.filestorage.filegrainstorage/constructors/constructor-string-orleans-persistence-filestorage-filegrainstorageoptions-micro-589746e8/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Runtime/Persistence/FileStorage/FileGrainStorage.cs#L18-L27)

```csharp
public FileGrainStorage(string storageName, FileGrainStorageOptions options, IOptions<ClusterOptions> clusterOptions, IActivatorProvider activatorProvider)
```

Stores grain state as files in a configured directory.

### Parameters

- `storageName` (`string`): The storage provider name.
- `options` (`FileGrainStorageOptions`): The provider options.
- `clusterOptions` (`IOptions<ClusterOptions>`): The cluster options.
- `activatorProvider` (`IActivatorProvider`): The grain state activator provider.
