mrc-ide / orderly2

https://mrc-ide.github.io/orderly2/
Other
7 stars 2 forks source link

Refactor directory expansion. #179

Closed plietar closed 3 weeks ago

plietar commented 3 weeks ago

There were three separate implementations of directory expansion spread across the codebase, each accepting slightly different inputs. The one used by orderly_resource operated over a single vector of paths. The one used by orderly_shared_resource operated over a dataframe of there/here columns. Finally the one used by orderly_copy_files used the packet metadata to enumerate files, instead of looking at the filesystem.

The three implementations are replaced by just one, which uses callbacks to determine which files are directories and to enumerate their contents. This enables it to be used either with real files on disk or off of a packet's metadata.