Skip to content

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

Closed

Description

@Heldenkrieger01

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.

Activity

  1. added
    state: needs discussion
    type: bug
    on Dec 14, 2021
  2. fgreinacher commented on Dec 17, 2021

    @fgreinacher
    Contributor

    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?

  3. Heldenkrieger01 commented on Dec 23, 2021

    @Heldenkrieger01
    Author

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

  4. fgreinacher commented on Jan 6, 2022

    @fgreinacher
    Contributor

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

  5. added
    area: core
    state: ready to pick
    type: enhancement
    and removed
    state: needs discussion
    type: bug
    on Jan 6, 2022
  6. added
    flag: good-first-issue
    on Feb 28, 2022
  7. vbreuss commented on Apr 16, 2023

    @vbreuss
    Member

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

  8. fgreinacher commented on Apr 19, 2023

    @fgreinacher
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreflag: good-first-issuestate: ready to picktype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions