kitura

How can I locate a resource file for a Kitura server?


I would like to load a file from disk in my Kitura server, but there doesn't seem to be a straightforward way to locate a file. Can anyone suggest how you would locate a file included with the server?

Note I am not talking about serving a static resource here, like a HTML page. I want to load the file into the server from disk, so I can work with the data.


Solution

  • You may find this IBM-Swift recently released package useful: https://github.com/IBM-Swift/FileKit