Lucee Resource Providers are virtual file system abstractions, as used for ftp, zip, file, s3, datasource etc
Recently I noticed that Lucee supports CFML based Resource Providers, as such
I’ve been hacking away and have a working prototype.
Along the way I’ve found some bugs, which are all documented on the repo and in jira
The initial idea was to provider a temp request://
filesystem, but that doesn’t work yet due to a Lucee bug
You can pass in your own storage adaptor cfc, currently there are two implementations
- struct based lucee-cfml-resource-provider/vfsStore.cfc at master · zspitzer/lucee-cfml-resource-provider · GitHub
- file based lucee-cfml-resource-provider/vfsStoreFileSystem.cfc at master · zspitzer/lucee-cfml-resource-provider · GitHub
You could do interesting things like adding a custom action on create file
- automatically generate different sized images when you write an image to the file system
- compress text files
- virus scanning
- uploading / mirroring else where
- writing history to git / versioning
- wrapping around another resource provider like s3 (the folder storage adaptor is wrapping around the file resource provider!)
Not ready for production use!