Walk a directory/Non-recursively: Difference between revisions
Content deleted Content added
added Scala section |
|||
Line 670: | Line 670: | ||
end |
end |
||
end</lang> |
end</lang> |
||
=={{header|Scala}}== |
|||
<lang Scala> |
|||
import java.io.File |
|||
val dir = new File("/foo/bar") |
|||
val contents = dir.list() |
|||
contents.filter(file => file.endsWith(".mp3")).foreach(println) |
|||
</lang> |
|||
=={{header|Seed7}}== |
=={{header|Seed7}}== |