Jump to content
Main menu
Main menu
move to sidebar
hide
Social
Discord
Facebook
Twitter
Explore
Languages
Tasks
Random page
Rosetta Code
Search
Search
Create account
Log in
Personal tools
Dark mode
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Walk a directory/Non-recursively: Difference between revisions
Page
Discussion
English
Read
View source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
View source
View history
Refresh
General
What links here
Related changes
Special pages
Page information
Get shortened URL
Help
← Older edit
Newer edit →
Content deleted
Content added
Inline
Revision as of 09:08, 13 February 2013
view source
rosettacode>Ninjacoder
m
→{{header|Scala}}
← Older edit
Revision as of 09:26, 13 February 2013
view source
rosettacode>Ninjacoder
m
→{{header|Scala}}
Newer edit →
Line 675:
Line 675:
import java.io.File
import java.io.File
val dir = new File("/foo/bar")
val dir = new File("/foo/bar"
).list(
)
val contents = dir.list()
⚫
dir
.filter(file => file.endsWith(".mp3")).foreach(println)
⚫
contents
.filter(file => file.endsWith(".mp3")).foreach(println)
</lang>
</lang>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
More information
OK
Toggle limited content width