Cache created File and Directory objects.
Opened this issue · 0 comments
bolinfest commented
It seems wasteful to create duplicate File
and Directory
objects for the same path. For example, every time Directory.getSubdirectory()
is invoked, it returns a new Directory
.
The constructors of File
and Directory
should be private. Getting access to an instance of either should go through a creation method that has the ability to consult a cache.