class CodeKindly::Utils::Dir
Constants
- SKIP_DIRS
Public Class Methods
all(path)
click to toggle source
# File lib/code_kindly/utils/dir.rb, line 9 def all(path) require 'fileutils' return [] unless ::Dir.exist?(path) files = ::Dir.entries(path) files.reject! { |f| SKIP_DIRS.include? f } files.sort end
find(path)
click to toggle source
# File lib/code_kindly/utils/dir.rb, line 17 def find(path) require 'fileutils' all(path).select { |entry| ::File.directory?("#{path}/#{entry}") } end