Skip to content

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

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. 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?

  2. Heldenkrieger01 commented on Dec 23, 2021

    @Heldenkrieger01
    Author

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

  3. 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 👍

  4. added
    area: coreIssues that address the core abstractions & the wrappers
    state: ready to pickIssues that are ready for being worked on
    type: enhancementIssues that propose new functionality
    and removed
    type: bugIssues that describe misbehaving functionality
    on Jan 6, 2022
  5. 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 ?

  6. 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: coreIssues that address the core abstractions & the wrappersflag: good-first-issueIssues that are good for first time contributorsstate: ready to pickIssues that are ready for being worked ontype: enhancementIssues that propose new functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions