PassEncoder icon indicating copy to clipboard operation
PassEncoder copied to clipboard

Unify method for adding files to a pass

Open aydenp opened this issue 4 years ago • 0 comments

Since #4 we have two ways to add files by Data (rather than one already on disk):

  • func addFile(named:,from:)
  • func addData(named:,from:)

The difference is that the first creates a temporary file on-disk, where the second does it entirely in memory. This is a workaround because the first doesn't support subdirectories (#6).

Ideally, only one of these should exist. Based on the outward appearance of the API, I would vote for the second which doesn't write to disk. This will also be important for #9, where these models may be reused.

aydenp avatar Nov 25 '21 21:11 aydenp