Add API to allow access to hidden files via PhysicalFilesProvider
Closed this issue · 4 comments
It is good that providers do not enumerate hidden files. It is also impossible to read contents of hidden files in default implementation.
In some cases accessing hidden files is necessary, for example I was trying to access a .gitignore
file content using PhysicalFileProvider
with no luck.
Having an optional flag to make hidden files available would be great.
@malekpour Curious why you were trying to use a .gitignore file in a web app... Even if we make this additional check, it seems to me that other workflows around the app may still fail to recognize these files (i.e. deployment scripts...)
I have a small app to browse & modify local and cloud file systems, migrating to AspNetCore. I decided to choose FileSystem
as an abstraction layer. Successfully implemented providers for cloud, but unable to use PhysicalFileProvider
since it hide and ignore all files starting with dot.
I'm writing a custom directory browser formatter. I would like to have metadata files like .build.info
in my folders and the custom formatter will use this to modify the output HTML.
When I call _fileProvider.GetFileInfo(requestPath.Add("/.build.info"))
it returns FileNotFound object. I would like to have ability to read hidden dot files using PhysicalFileProvider
class.
Please look at #293 about further enhancements in PhysicalFilesProvider .