Using Roots & Stores
Base Chains
Once you can access FMTC.instance
, you can chain on other methods to use the majority of this library's functionality. These are the base chains you will need:
To get the Root and it's associated information, just chain on rootDirectory
, as so:
Extra Chains
After this, you can chain any of the following members/accessors (each will be accessible on a Root, a Store, or both):
Many of the symbols one level beneath the ones listed here, for example those under manage
, have asynchronous versions which are recommended for performance.
To use them, if available, just add 'Async' to the end of the symbol. For example, manage.ready
and manage.readyAsync
.
access
Access the underlying file/directory structure as standard 'dart:io' objects (advanced)
manage
Modify and control the structure itself, such as creation and deletion operations
stats
Retrieve statistics about a structure, such as size and length
recovery
Recover failed bulk downloads, and prepare them to restart
migrator
Migrate the incompatible file/directory structure of a root from a previous version of FMTC to a newer version
import
Import and prepare a store from a previously exported archive file
download
Prepare, start, and manage a store's bulk downloads
metadata
A simple key-value pair store designed for storing simple, store related information
export
Export a store to an archive file, for future importing
If you receive warnings in your IDE about using internal members outside its package, you should use the chains listed above instead of directly using the indicated object.
Last updated