There appears to be a small difference between the implementations of shinyFilesChoose and shinyFileSave where Save causes immediate evaluation of the triple-dots (...) arguments.
Choose defers creating the fileGetter until sendDirectoryData is invoked while Save immediately (and outside a reactive context) creates the fileGetter, thereby causing the evaluation of the triple-dots (...) arguments.
Is there a reason for this? Is it necessary?
Because of this, these two similar functions have different performance behavior in server code: shinyFilesChoose can rely upon reactive expressions in the ... arguments while shinyFileSave cannot.
There appears to be a small difference between the implementations of shinyFilesChoose and shinyFileSave where Save causes immediate evaluation of the triple-dots (...) arguments.
Choose defers creating the fileGetter until sendDirectoryData is invoked while Save immediately (and outside a reactive context) creates the fileGetter, thereby causing the evaluation of the triple-dots (...) arguments.
Is there a reason for this? Is it necessary?
Because of this, these two similar functions have different performance behavior in server code: shinyFilesChoose can rely upon reactive expressions in the ... arguments while shinyFileSave cannot.
https://github.com/thomasp85/shinyFiles/blob/da361359712bbcd74dd6a9505a88ec87aead13bc/R/filechoose.R#L222
https://github.com/thomasp85/shinyFiles/blob/da361359712bbcd74dd6a9505a88ec87aead13bc/R/filesave.R#L29