cbfs
  • Introduction
  • Intro
    • Release History
    • About This Book
  • Getting Started
    • Installation
    • Providers
      • Local Provider
      • RAM Provider
      • S3 Provider
  • Usage
    • Disk Service
    • Disk Usage
      • Configuration Methods
      • File Methods
      • File Object
      • Directory Methods
      • Utility Methods
      • Stream Methods
      • Verification Methods
  • Digging Deeper
    • Interceptors
    • Module Disks
    • Custom Providers
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Digging Deeper

Module Disks

Use HMVC and define module disks

PreviousInterceptorsNextCustom Providers

Last updated 2 years ago

Was this helpful?

If you are creating your own ColdBox modules, you can create disks from those modules in the configure() lifecycle method in the ModuleConfig.cfc. You will do so by creating a cbfs key and adding either module disks or global disks.

  • disks : The collection of disks the module collaborates. Each name will be suffixed with the module name: key@moduleName

  • globalDisks : A collection of global name spaced disks the module contributes to the entire application.

component {
  function configure(){
	settings = {
	  // CBFS Module
	  cbfs : {
		// Disks that will be namespaced with the module name @diskModule
		// temp@diskModule
		// nasa@diskModule
		disks : {
			"temp" : { provider : "Ram" },
			"nasa" : { provider : "Ram" }
		},
		// No namespace in global spacing
		// temp
		// nasa
		globalDisks : {
			// Should be ignored, you can't override if it exists
			"temp" : { provider : "Ram" },
			"nasa" : { provider : "Ram" }
		}
	   }
	};
  }	
}
cbfs with HVMC