Rename function to include whether they create input or output streams.