Skip to content

PhysicalDirectoryInfo.PhysicalPath should return relative path #2533

@aspnet-hello

Description

@aspnet-hello

From @jiatao99 on Wednesday, December 13, 2017 7:55:14 AM

Call provider.GetDirectoryContents("") might return a PhysicalDirectoryInfo. From there, I should be able to call the provider.GetDirectoryContents(dir.PhysicalPath) to retrieve the directory content from sub folder. However, the PhysicalDirectoryInfo.PhysicalPath returns the absolute path.

Since PhysicalFileProvider only take relative path, I have no easy way to recursively list all the directory contents in the file system.

In my opinion, both PhysicalDirectoryInfo and PhysicalFileInfo should always return relative path (to provider) to follow the design pattern

Copied from original issue: aspnet/FileSystem#306

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions