Storage Files and Directories

Using a Storage Live File Provider ( allows to specify the location and naming rules for all storage related files.

available properties are:

  • BaseDirectory The Microstream storages location base directory. Contains channel directories and type dictionary file.

  • DeletionDirectory If configured, the storage will not delete files. Instead of deleting a file it will be moved to this directory.

  • TruncationDirectory If configured, files that will get truncated are copied into this directory.

  • ChannelDirectoryPrefix Channel directory prefix string

  • StorageFilePrefix Storage file prefix string

  • StorageFileSuffix storage file extension

  • TransactionsFilePrefix transactions file prefix

  • TransactionsFileSuffix transaction file extension

  • TypeDictionaryFileName filename of the type dictionary

StorageFileNameProvider fileNameProvider = StorageFileNameProvider.Builder()
.setDataFilePrefix ("canal_")
.setDataFileSuffix (".bin")
.createFileNameProvider ()
NioFileSystem fileSystem = NioFileSystem.New();
StorageLiveFileProvider fileProvider = Storage
.FileProviderBuilder (fileSystem)
.setDirectory (fileSystem.ensureDirectoryPath(WORKINGDIR))
.setDeletionDirectory (fileSystem.ensureDirectoryPath(DELETIONDIR))
.setFileNameProvider (fileNameProvider)
.createFileProvider ()