Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (16 sloc) 0.377 kB
require 'expression'
class Writable < Expression
def evaluate(dir)
results = []
Find.find(dir) do |p|
next unless File.file?(p)
results << p if(File.writable?(p))
end
results
end
end
=begin
writable_expr = Writable.new
writable_files = writable_expr.evaluate('/Users/adomokos/Programming/Ruby')
puts "Number of writable files: #{writable_files.length}"
=end
Jump to Line
Something went wrong with that request. Please try again.