[SR-15719] func writeFileContents(path:,bytes:)
should have an option to create the parent directory
#4361
Labels
func writeFileContents(path:,bytes:)
should have an option to create the parent directory
#4361
Additional Detail from JIRA
md5: 9052552b66dd7ea15028217d415b5f1f
Issue Description:
A lot of the SwiftPM unit tests use the ToolsSupportCore method `writeFileContents(_ path: AbsolutePath, body: (WritableByteStream) -> Void) throws`, which conveniently creates the parent directory of the file if needed.
But the core funnel method `func writeFileContents(_ path: AbsolutePath, bytes: ByteString)` does not have a way of creating the directory.
It would be useful to be able to create the directory from any of the variants of `func writeFileContents(_ path: AbsolutePath, bytes: ByteString)`, so this SR suggest adding a parameter to do that. It probably needs to default to false for compatibility, but that can be discussed.
The text was updated successfully, but these errors were encountered: