Open FreshMarker File for other file systems
Sometimes an extension starts with a question that sounds unremarkable at first: Can I use the files from an OCI-based file system in a FreshMarker template? FreshMarker File already supports java.nio.file.Path. An OCI file system like Oras Filesystem also returns Path objects. So, in theory, the integration should work. However, during practical testing, I discovered an assumption in my code that works for local paths but not for other file systems: I had converted a Path back to a java.io.File in several places. This investigation led to a general extension of FreshMarker File. The existing Path operations now use Java NIO, and templates can additionally list directories and examine symbolic links.