10 |
|
|
11 |
|
#include "FileSystem.hpp" |
12 |
|
|
13 |
< |
FileSystem::FileSystem(const cse::String &sitemap, const cse::String &base, ext::Queue<Url> &queue, api::ThreadMutex &queueLock, const _R<FileSystemCommand> &command) : CommandRunner(sitemap, base, queue, queueLock) |
13 |
> |
FileSystem::FileSystem(const cse::String &sitemap, const cse::String &base, ext::Queue<Url> &queue, api::ThreadMutex &queueLock, const _R<FileSystemCommand> &command) : CommandRunner(sitemap, queue, queueLock) |
14 |
|
{ |
15 |
|
api::Cout << _B("File System") << ios::NewLine; |
16 |
|
|
17 |
< |
Directory(*command, base); |
17 |
> |
Directory(command->root, _S<ios::String>() << base << command->path, true); |
18 |
|
} |
19 |
|
|
20 |
< |
void FileSystem::Directory(const api::Path &directory, const cse::String &base) |
20 |
> |
void FileSystem::Directory(const api::Path &directory, const cse::String &base, bool root) |
21 |
|
{ |
22 |
< |
ext::RedBlackSet<cse::String> excludes; |
22 |
> |
ext::RedBlackSet<cse::String> excludes(GetProperties<ext::RedBlackSet<cse::String> >(_B("GoogleTron:Exclude"), directory.GetPath())); |
23 |
|
|
24 |
< |
{ |
25 |
< |
_S<ios::Buffer> property(client.GetProperty(_B("GoogleTron:Exclude"), directory.GetPath())); |
26 |
< |
ext::Buffer exclude; |
27 |
< |
|
28 |
< |
while (ios::ReadLine(property, exclude)) |
29 |
< |
excludes.Insert(exclude); |
30 |
< |
} |
31 |
< |
|
32 |
< |
if (base == this->base) |
24 |
> |
if (root) |
25 |
|
excludes.Insert(sitemap); |
26 |
|
|
27 |
|
_foreach (const _L<Subversion::Entry>, entry, client.GetEntries(directory.GetPath())) |