StoreDirectory constructor

  1. @internal
StoreDirectory(
  1. RootDirectory rootDirectory,
  2. String storeName, {
  3. bool autoCreate = true,
})

Creates an access point to a store

Contains access to:

  • Statistics
  • Management
  • Low-Level Access (advanced)

A store is identified by it's validated store name (see FMTCSettings.filesystemSanitiser - an error is throw if the name is invalid), and represents a directory that resides within a RootDirectory. Each store contains multiple sub-directories.

Construction via this method automatically calls StoreManagement.create before returning (by default), so the caching directories will exist unless deleted using StoreManagement.delete. Disable this initialisation by setting autoCreate to false.

Implementation

@internal
StoreDirectory(
  this.rootDirectory,
  this.storeName, {
  bool autoCreate = true,
}) {
  if (autoCreate && !manage.ready) manage.create();
}