Open
Description
It would be cool if we could do the same as:
def apply(relativePath: RelPath): Seq[Array[Byte]] =
val fixtureDirPath = os.resource / "fixtures" / relativePath
val uri = getClass.getClassLoader.getResource(fixtureDirPath.segments.mkString("/")).toURI
val path =
if uri.getScheme == "jar"
then FileSystems.newFileSystem(uri, Map.empty[String, Any].asJava).getPath(fixtureDirPath.toString)
else Paths.get(uri)
Files
.list(path)
.iterator()
.asScala
.map(path => os.read.bytes(os.Path(path)))
.toSeq
Thanks
Metadata
Metadata
Assignees
Labels
No labels