Currently I can only fetch one file directly, but I'd like to be able to fetch all resources within a directory.
Some use-cases:
- I want to be able to fetch all files in a directory, and filter them (for example, to only get files with a prefix
test-a, or only get JSON files
- I have a very organised directory structure, so that all subdirectories represent a test case with the same 4 files. I want to be able to
- fetch all directories in
commonTest/resources/test-cases/
- convert each one to a 'test case' class with 4 properties (one for each file)
- pass each 'test case' to my test
So, I would like to be able to load an arbitrary file-system item, and be able to determine if it is a file or directory (for example, the returned object is in a sealed-interface hierarchy, so I can use a type-check).
Currently I can only fetch one file directly, but I'd like to be able to fetch all resources within a directory.
Some use-cases:
test-a, or only get JSON filescommonTest/resources/test-cases/So, I would like to be able to load an arbitrary file-system item, and be able to determine if it is a file or directory (for example, the returned object is in a sealed-interface hierarchy, so I can use a type-check).