This would produce ./build/01.md and ./build/02.md, thereby eliminating some minor code duplication. (The trailing slash could be used to denote a directory; otherwise, knit could check to see if the build parameter already exists as a directory before trying to write it as a regular file. In the case that the specified path is a directory that exists, knit would export the file into said directory.)
The text was updated successfully, but these errors were encountered:
The code to generate the filename of file.md within the artefacts directory is likely fairly analogous to code that already exists inside the knit function (with respect to manipulating the destination filename).
It would have if the package didn't create temporary files in the directory being monitored for the creation of or updates to Markdown files using inotifywait. Although I could ignore .knit.md and .utf8.md files, it isn't a very clean solution. (That is, there could be other temporary files created or end-users could actually name some of their files with a .knit.md extension, which I'd have to tell them not to do and then explain why...)
Creating a temporary directory for the intermediates_dir parameter could be another solution, but that's still extra complexity --- pretty much equivalent to parsing out the file name extension but with an I/O performance hit and the introduction of cross-platform temporary directory creation (and permissions) concerns.
Thank you, though, it would have otherwise worked.