Skip to main content
Version: v1

FileDocumentServiceFactory Class

Factory for creating the file document service. Use this if you want to use the local file storage as underlying storage.

Signature​

export declare class FileDocumentServiceFactory implements IDocumentServiceFactory

Implements: IDocumentServiceFactory

Constructors​

ConstructorDescription
(constructor)(storage, deltaStorage, deltaConnection)Constructs a new instance of the FileDocumentServiceFactory class

Properties​

PropertyTypeDescription
protocolName

Methods​

MethodReturn TypeDescription
createContainer(createNewSummary, resolvedUrl, logger, clientIsSummarizer)Promise<IDocumentService>
createDocumentService(fileURL, logger, clientIsSummarizer)Promise<IDocumentService>Creates the file document service if the path exists.

Constructor Details​

(constructor)​

Constructs a new instance of the FileDocumentServiceFactory class

Signature​

constructor(storage: IDocumentStorageService, deltaStorage: FileDeltaStorageService, deltaConnection: IDocumentDeltaConnection);

Parameters​

ParameterTypeDescription
storageIDocumentStorageService
deltaStorageFileDeltaStorageService
deltaConnectionIDocumentDeltaConnection

Property Details​

protocolName​

Signature​

readonly protocolName = "fluid-file:";

Method Details​

createContainer​

Signature​

createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;

Parameters​

ParameterModifiersTypeDescription
createNewSummaryISummaryTree
resolvedUrlIResolvedUrl
loggeroptionalITelemetryBaseLogger
clientIsSummarizeroptionalboolean

Returns​

Return type: Promise<IDocumentService>

createDocumentService​

Creates the file document service if the path exists.

Signature​

createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;

Parameters​

ParameterModifiersTypeDescription
fileURLIResolvedUrlPath of directory containing ops/snapshots.
loggeroptionalITelemetryBaseLogger
clientIsSummarizeroptionalboolean

Returns​

file document service.

Return type: Promise<IDocumentService>