Editar

Compartilhar via


Local Adapter

The local adapter is the storage adapter that's used to interact with data on the local file system.

public class LocalAdapter extends StorageAdapterBase

Constructors

Name Description
LocalAdapter() Initializes a new instance of the LocalAdapter class. The user must apply an adapter configuration if this constructor is used. See UpdateConfig(...).
LocalAdapter(string)
root: The root path of the schema documents.
Initializes a new instance of the LocalAdapter class.

Properties

Name Type Description
Root string The root path of the schema documents.
LocationHint string The hint given to the reader application about where the adapter implementation can be obtained (Nuget, NPM, etc.).

Methods

Name Description Return Type
CanRead() Returns true, since the local adapter can read data. bool
CanWrite() Returns true, since the local adapter can write data to its source. bool
ReadAsync(string) See StorageAdapterBase.ReadAsync(...). Task<string>
WriteAsync(string, string) See StorageAdapterBase.WriteAsync(...). Task
CreateAdapterPath(string) See StorageAdapterBase.CreateAdapterPath(...). string
CreateCorpusPath(string) See StorageAdapterBase.CreateCorpusPath(...). string
ClearCache() See StorageAdapterBase.ClearCache(). This method doesn't do anything because the local adapter doesn't maintain a cache. void
ComputeLastModifiedTimeAsync(string) See StorageAdapterBase.ComputeLastModifiedTimeAsync(...). Task<DateTimeOffset?>
FetchAllFilesAsync(string) See StorageAdapterBase.FetchAllFilesAsync(...). Task<List<string>>
FetchAllFilesMetadataAsync(string) See StorageAdapterBase.FetchAllFilesMetadataAsync(...). Task<IDictionary<string, CdmFileMetadata>>
FetchFileMetadataAsync(string) See StorageAdapterBase.FetchFileMetadataAsync(...). CdmFileMetadata
FetchConfig() See StorageAdapterBase.FetchConfig(). string
UpdateConfig(string) See StorageAdapterBase.UpdateConfig(...). void
CreateFileQueryCacheContext() See StorageAdapterBase.CreateFileQueryCacheContext(). IDisposable