sample/dir.rb


DEFINITIONS

This source file includes following functions.


   1  # directory access
   2  # list all files but .*/*~/*.o
   3  dirp = Dir.open(".")
   4  for f in dirp
   5    $_ = f
   6    unless (~/^\./ || ~/~$/ || ~/\.o/)
   7      print f, "\n"
   8    end
   9  end
  10  dirp.close