projects
/
mailshears.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add some new fixtures in preparation for prune tests.
[mailshears.git]
/
lib
/
common
/
filesystem.rb
1
class
Filesystem
2
3
def self
.
begins_with_dot
(
path
)
4
return
(
path
[
0
.
.0
] ==
'.'
)
5
end
6
7
def self
.
get_subdirs
(
dir
)
8
subdirs
= []
9
10
Dir
.
open
(
dir
)
do
|
d
|
11
d
.
each
do
|
entry
|
12
relative_path
=
File
.
join
(
dir
,
entry
)
13
if
(
File
.
directory
?(
relative_path
)
and not
begins_with_dot
(
entry
))
14
subdirs
<<
entry
15
end
16
end
17
end
18
19
return
subdirs
20
end
21
22
end