summaryrefslogtreecommitdiff
path: root/sample/dir.rb
blob: f269c568bab0f8c6d82c63b6c88099d4647deb87 (plain)
1
2
3
4
5
6
7
8
9
10
# directory access
# list all files but .*/*~/*.o
dirp = Dir.open(".")
dirp.rewind
for f in dirp
  unless (~/^\./ || ~/~$/ || ~/\.o/)
    print f, "\n"
  end
end
dirp.close