Open jmooring opened 3 months ago
{{ ufs.ReadDir }}
Maybe fs.ReadDir
would mke more sense -- it's not likely we're going to invent another file system.
There are some potential suprises, though, which we need to think about before doing this. This is component
dependant, but e.g. doing fs.ReadDir "content/posts"
may return multiple files with the same name (with different languages). Also, the behaviour of these are very much tied to "what Hugo needs", which may change.
So we can add fs.FileExists
, but we need to think about the ReadDir.
See also #11917
Reference: https://discourse.gohugo.io/t/methods-to-traverse-the-virtual-filesystem/49058/
Why not just modify
os.ReadDir
andos.FileExists
?