Find Subdirectories


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. def subdirectories_of(path, options = {})
  2. depth = options[:at_depth_of] || 1
  3. Dir[File.join(path, * ["*"] * depth + [""])]
  4. end

Report this snippet


Comments


You need to login to view comments.