Documentation
Table of Contents

Constructor FolderDocumentStore

Namespace
IntentSharp.Documents
Assembly
IntentSharp.dll

FolderDocumentStore(string, FolderDocumentStoreOptions?, ILogger<FolderDocumentStore>?)

Opens the store over the working folder root: reads its state, starts watching (unless WatchForChanges is false) and reads the working folder once before returning, so edits made while the application was stopped are already handled. The constructor blocks on that file input and output.

public FolderDocumentStore(string root, FolderDocumentStoreOptions? options = null, ILogger<FolderDocumentStore>? logger = null)

Parameters

root string

The working folder. A relative path resolves against BaseDirectory.

options FolderDocumentStoreOptions

Settings for the store. Null uses the defaults.

logger ILogger<FolderDocumentStore>

Receives problems, rejected and widening external edits, the read-only notice and file-system errors. Null logs nothing.

Exceptions

ArgumentException

root is null, empty or white space; or StateRoot is blank, is the working folder or contains it; or Validators holds null.

ArgumentOutOfRangeException

An option is out of its range (see each option).

DirectoryNotFoundException

The working folder does not exist.

IOException

The state file is not valid, or the lock file stayed held by another instance for LockTimeout.