mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-12 17:55:33 +00:00
filter non-aqua files (#246)
This commit is contained in:
parent
96bc76ef2a
commit
f59a93ac27
@ -107,7 +107,8 @@ class AquaFilesIO[F[_]: Files: Concurrent] extends AquaIO[F] {
|
|||||||
} else {
|
} else {
|
||||||
Files[F].isDirectory(folder).flatMap { isDir =>
|
Files[F].isDirectory(folder).flatMap { isDir =>
|
||||||
if (isDir) {
|
if (isDir) {
|
||||||
Files[F].list(folder).compile.toList.map(Right(_))
|
Files[F].list(folder).evalFilter(p => if (p.extName == ".aqua") true.pure[F] else Files[F].isDirectory(p))
|
||||||
|
.compile.toList.map(Right(_))
|
||||||
} else {
|
} else {
|
||||||
Right(folder :: Nil).pure[F]
|
Right(folder :: Nil).pure[F]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user