ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Spectre/Spectre.cpp
(Generate patch)

Comparing trunk/Spectre/Spectre.cpp (file contents):
Revision 176 by douglas, 2003-07-05T17:36:35-07:00 vs.
Revision 177 by douglas, 2003-07-05T18:09:20-07:00

# Line 304 | Line 304 | void automake(set<string>& makes, ipstre
304  
305   void automount(set<string>& mounts)
306   {
307 +        DIR* dir = opendir(config.root.c_str());
308 +        dirent* file;
309 +
310 +        while((file = readdir(dir)) != NULL)
311 +        {
312 +                struct stat dir;
313 +                string folder = config.root + "/" + file->d_name;
314 +
315 +                stat(folder.c_str(), &dir);
316 +
317 +                if (S_ISDIR(dir.st_mode))
318 +                {
319 +                        string folder = file->d_name;
320 +
321 +                        if (folder == "." || folder == "..") continue;
322 +
323 +                        mounts.insert(folder);
324 +                }
325 +        }
326 +
327 +        closedir(dir);
328 +
329 +        if (debug)
330 +        {
331 +                cerr << "mounts = {\n";
332 +
333 +                for (set<string>::iterator itor = mounts.begin(); itor != mounts.end();
334 +                        itor++)
335 +                {
336 +                        cerr << "   " << *itor << "\n";
337 +                }
338 +
339 +                cerr << "}\n";
340 +        }
341   }
342  
343   void configure()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines