There are ColdBox interception points that are announced when working with CBFS disks, directories, and files that you can use. These can be used to provide additional functionality in your applications such as logging file access, securing folders, and more.
Invoked after a disk has been started.
{% hint style="info" %} CBFS automatically manages the starting of disks. {% endhint %}
component {
function cbfsOnDiskStart( disk ) {
//java...
}
}
{% hint style="info" %} CBFS automatically manages the shutdown of disks. {% endhint %}
Invoked after a disk has been shutdown.
component {
function cbfsOnDiskShutdown( disk ) {
//java...
}
}
Invoked when a file is created.
component {
function cbfsOnFileCreate( file ) {
}
}
Invoked when a file is moved.
component {
function cbfsOnFileMove( file ) {
}
}
Invoked when a file is copied.
component {
function cbfsOnFileCopy( file ) {
}
}
Invoked when a file is deleted.
component {
function cbfsOnFileDelete( file ) {
}
}
Invoked when info or extended info is requested on a file.
component {
function cbfsOnFileInfoRequest( file ) {
}
}
Invoked when a file is moved.
component {
function cbfsOnFileMove( file ) {
}
}
Invoked when a directory is moved.
component {
function cbfsOnDirectoryMove( source, destination, disk ) {
}
}
Invoked when a directory is created.
component {
function cbfsOnDirectoryCreate( directory, disk ) {
}
}
Invoked when a directory is copied.
component {
function cbfsOnDirectoryCopy( source, destination, disk ) {
}
}
Invoked when a directory is deleted.
component {
function cbfsOnDirectoryDelete( directory, disk ) {
}
}