Created
February 7, 2016 20:52
-
-
Save AbdallaZaki/3dd958979d3445a74fee to your computer and use it in GitHub Desktop.
fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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