Skip to content

Should IFileInfo's PhysicalPath always be null? #7699

Open
@AnthonyMastrean

Description

@AnthonyMastrean

Except for the PhysicalFileInfo implementation from the PhysicalFileProvider, it seems like IFileInfo's PhysicalPath should always be null, especially when the implementation type doesn't use a physical file system.

This seems to be the case for known implementations like your own ManifestEmbeddedFileProvider's ManifestFileInfo; and the expectation for a custom implementation like a possible ZipArchiveFileProvider's ZipEntryFileInfo based on your ZipArchive and ZipEntry.

If this is the case, it would be nice to document this understanding... I suspect it's too late to suggest exposing PhysicalPath only on the PhysicalFileInfo.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.fileproviders.ifileinfo.physicalpath?view=dotnet-plat-ext-6.0#microsoft-extensions-fileproviders-ifileinfo-physicalpath

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions