Skip to content

Instantly share code, notes, and snippets.

@AbdallaZaki
Created February 7, 2016 20:52
Show Gist options
  • Save AbdallaZaki/3dd958979d3445a74fee to your computer and use it in GitHub Desktop.
Save AbdallaZaki/3dd958979d3445a74fee to your computer and use it in GitHub Desktop.
fix
def loop dir , parent = Dir.pwd
Dir.entries(dir).each do |e|
if File.directory?(e) && (e!="." && e!="..")
dir_path=File.absolute_path(e ,parent)
puts dir_path
loop dir_path , e
elsif !File.directory?(e) && (e!="." && e!="..")
puts File.absolute_path(e , parent)
end
end
end
loop Dir.pwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment