forked from belowaverage-org/webdows
-
Notifications
You must be signed in to change notification settings - Fork 9
/
WFS.php
24 lines (24 loc) · 786 Bytes
/
WFS.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
function wfsBuild($dir) {
$contents = array();
foreach(scandir($dir) as $node) {
if($node == '.') continue;
if($node == '..') continue;
if($node == '.git') continue;
if($node == 'Thumbs.db') continue;
if($node == 'CNAME') continue;
if($node == '.gitignore') continue;
if($node == 'readme.md') continue;
if($node == '.gitmodules') continue;
if($node == 'WFS.php') continue;
if (is_dir($dir.DIRECTORY_SEPARATOR.$node)) {
$contents[$node] = wfsBuild($dir.DIRECTORY_SEPARATOR.$node);
} else {
$contents[] = $node;
}
}
return $contents;
}
$wfs = wfsBuild('./');
file_put_contents('webdows/config/wfs.json', json_encode($wfs));
?>