Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IFile.Create has different return type than File.Create #779

Closed
Heldenkrieger01 opened this issue Dec 14, 2021 · 5 comments
Closed

IFile.Create has different return type than File.Create #779

Heldenkrieger01 opened this issue Dec 14, 2021 · 5 comments
Labels
area: core Issues that address the core abstractions & the wrappers flag: good-first-issue Issues that are good for first time contributors state: ready to pick Issues that are ready for being worked on type: enhancement Issues that propose new functionality

Comments

@Heldenkrieger01
Copy link

Describe the bug
The IFile.Create() method returns a Stream, but the "original" File.Create() returns a FileStream. This is important, because the FileStream contains the Name-property with the files name.

Expected behavior
IFile.Create() returns a FileStream.

@Heldenkrieger01 Heldenkrieger01 added state: needs discussion Issues that need further discussion type: bug Issues that describe misbehaving functionality labels Dec 14, 2021
@fgreinacher
Copy link
Contributor

fgreinacher commented Dec 17, 2021

This is more or less by design, because FileStream relies on the real file system.

We could return a custom subclass of Stream that adds the Name property.

What do you think about this @Heldenkrieger01?

@Heldenkrieger01
Copy link
Author

That would be great, especially for people like me, that move to Abstractions with existing code.

@fgreinacher
Copy link
Contributor

Cool, so let's make this as ready and discuss details in a PR, once somebody finds the time to work on this 👍

@fgreinacher fgreinacher added area: core Issues that address the core abstractions & the wrappers state: ready to pick Issues that are ready for being worked on type: enhancement Issues that propose new functionality and removed state: needs discussion Issues that need further discussion type: bug Issues that describe misbehaving functionality labels Jan 6, 2022
@fgreinacher fgreinacher added the flag: good-first-issue Issues that are good for first time contributors label Feb 28, 2022
@vbreuss
Copy link
Member

vbreuss commented Apr 16, 2023

I think this issue can be closed, as the FileSystemStream was implemented in #906 ...
Do you agree, @Heldenkrieger01 ?

@fgreinacher
Copy link
Contributor

I'm closing this. Feel free to reopen if needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues that address the core abstractions & the wrappers flag: good-first-issue Issues that are good for first time contributors state: ready to pick Issues that are ready for being worked on type: enhancement Issues that propose new functionality
Projects
None yet
Development

No branches or pull requests

3 participants