Ask a Jedi: Documentation on VFS Support

Steve asks:

Regarding the Virtual File System in CF 9: does not appear it's supported in all tags. My attempt to do: results in: The ram:///vfsfile.pdf specified in the cfpdfform tag either does not exist or is not accessible by this tag.

Is there documentation on what is/isn't supported? </blockquote> Absolutely - but it is a bit hard to find if you don't know where to search. The core documentation may be found online here: Working with in-memory files Within this documentation you will find a section on functions and tags that work with VFS. The functions are: FileIsEOF
FileReadBinary
Filemove
Filecopy
FileReadLine
FileExists
FileOpen
FileWriteln
FileClose
FileRead
FileDelete
DirectoryExists
FileSetLastModified
GetFileInfo
GetDirectoryFromPath
GetFileFromPath
ImageNew
ImageRead
ImageWrite
ImageWriteBase64
IsImageFile
IsPDFFile
FileSetLastModified
The docs seem to be missing the new directory functions, like directoryList, which should work just fine with VFS. Those functions were a late addition to ColdFusion 9 so I assume this is just an oversight. Tags supported with VFS are: cfcontent
cfdocument
cfdump
cfexchange
cfexecute
cffeed
cfhttp
cfftp
cfimage
cfloop
cfpresentation
cfprint
cfreport
cfzip
As you can see, cfpdfform isn't listed there, nor is cfpdf. My guess here is that the PDF support in ColdFusion relies on libraries that can't grok non-physical files.
Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments