Skip to content

MockFileSystem.FileInfo.FromFileName("some\\directory") has Length property set to '0' #440

@Xerillio

Description

@Xerillio

I noticed there's a discrepancy between FileSystem and MockFileSystem when returning a FileInfoBase for a directory path. Trying to access the FileInfoBase.Length property for an object returned by FileSystem results in a FileNotFoundException while the object from MockFileSystem is just 0.

It seems the MockFileSystem should also throw an exception to follow the .NET behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: in workIssues that are currently worked ontype: bugIssues that describe misbehaving functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions