Disk Service
cbfs includes a Disk Service object you can use to register and interact with your disks.
Last updated
Was this helpful?
cbfs includes a Disk Service object you can use to register and interact with your disks.
Last updated
Was this helpful?
dThe full API for the Disk Service can be found in the .
The cbfs module registers a WireBox injection DSL that you can use to inject objects from the module.
cbfs
Inject the Disk Service
cbfs:disks
Inject the entire disk records
cbfs:disks:{name}
Inject a specific disk instance by {name}
The cbfs module registers a helper method called cbfs( diskName )
that you can use in your handlers, layouts, and views to get an instance of a specific disk:
Returns the count of registered disks.
Return an instance of the default disk defined in your configuration.
Returns requested disk instance. Throws InvalidDiskException
if the disk is not registered.
Returns struct of details for a disk.
Returns true if the disk has been registered with the provided name.
Returns an array of registered disk names.
Registers a new disk. If a disk has already been configured with the same name, then it will not be updated unless you specify override=true
.
Unregisters and shuts down all disks managed by the DiskService.
Returns the temporary disk.
Unregisters a disk. Throws InvalidDiskException
if the disk is not registered.