Skip to content

Interface: MastraFileSystemAdapterOptions

Options for filesystems / MastraFileSystemAdapter.

  • MastraFilesystemOptions

optional description?: string

Mount description surfaced by composite filesystem listings and help.


optional displayName?: string

Human-friendly mount name surfaced by composite filesystem listings.


optional id?: string

Override the Mastra filesystem id. Defaults to the source FileSystem.id.


optional instructions?: string

Replace the generated filesystem usage instructions.


optional name?: string

Override the Mastra display name. Defaults to MastraFileSystemAdapter.


optional onDestroy?: FilesystemLifecycleHook

Called before the filesystem is destroyed

MastraFilesystemOptions.onDestroy


optional onInit?: FilesystemLifecycleHook

Called after the filesystem reaches ‘ready’ status

MastraFilesystemOptions.onInit


optional provider?: string

Override the Mastra provider id. Defaults to the source FileSystem.backend.


optional readOnly?: boolean

Force read-only mounts even when the source filesystem allows writes. The source FileSystem.readOnly flag still applies either way.


optional textExtensions?: string[]

Additional file extensions to treat as text, extending (not replacing) the built-in set. Affects which files tools like grep will search.

Values are normalized to lowercase and dot-prefixed, so 'sas', '.sas', and '.SAS' are equivalent.

new LocalFilesystem({ basePath: '.', textExtensions: ['.sas', '.log'] })

MastraFilesystemOptions.textExtensions