How do I best convert a File to a Directory or Reg...
# community-support
s
How do I best convert a File to a Directory or RegularFile?
v
layout.dir
and
layout.file
iirc
s
they take a Provider<File>, not a File.
v
So?
layout.dir(providers.provider { myFile })
s
Well, I was hoping there’s a more direct way without extra objects, but okay.
v
None I'm aware of. A few versions ago even that was not present but you had to use an existing directory provider