RouterStaticFiles extension

Adds static-file mounting helpers to an individual router.

on

Methods

signedStorage(String relativePath, Filesystem storage, {required StorageSignedUrlSigner signer, String rootPath = '', String indexFile = 'index.html'}) → void

Available on Router, provided by the RouterStaticFiles extension

Mounts private storage objects behind time-limited signed URLs.
static(String relativePath, String rootPath, {FileSystem? fileSystem, bool listDirectory = false}) → void

Available on Router, provided by the RouterStaticFiles extension

Mounts a directory at relativePath on this router.
staticFile(String relativePath, String filePath, [FileSystem? fs]) → void

Available on Router, provided by the RouterStaticFiles extension

Mounts one file at relativePath on this router.
staticFileFS(String relativePath, String filePath, Dir dir) → void

Available on Router, provided by the RouterStaticFiles extension

Mounts one file using an explicit parent directory dir.
staticFS(String relativePath, Dir dir) → void

Available on Router, provided by the RouterStaticFiles extension

Mounts a directory using an explicit dir definition.
staticStorage(String relativePath, Filesystem storage, {String rootPath = '', bool listDirectory = false, String indexFile = 'index.html'}) → void

Available on Router, provided by the RouterStaticFiles extension

Mounts a directory from an asynchronous storage_fs backend.