Closed xalexalex closed 10 months ago
thanks @xalexalex for your contribution! instead of globbing with .*
to get files, could we use a combination of iterdir
and is_file()
? for example, my concern is that this might capture hidden files. and while unlikely, it's possible that a file might not have an extension and therefore no .
character.
i am thinking of something like this:
from pathlib import Path
files_in_wsi_dir =[p for p in wsi_dir.iterdir() if p.is_file()]
thanks for bringing up the MRXS use case!
thanks @xalexalex for the contribution!
fixes #189
this could also be done differently, e.g.
glob("*")
oriterdir
+ checking ifis_dir