Split a file path into individual directory names.
Example:
split_all("a/b/c") => ['a', 'b', 'c']
Source Code
# File rake.rb, line 946 def split_all(path) head, tail = File.split(path) return [tail] if head == '.' || tail == '/' return [head, tail] if head == '/' return split_all(head) + [tail] end
<code/>and<pre/>for code samples.