示例#1
0
 public static function start()
 {
     self::debug("Start  ");
     foreach (self::$d_arr as $key => $startdir) {
         if ($startdir != "") {
             self::debug("Processing " . $startdir);
             unset(self::$d_arr[$key]);
             if (self::isNotExcluded($startdir)) {
                 self::writePermFile($startdir, "D");
                 self::$count++;
                 self::getDirectories($startdir);
             } else {
                 self::debug("{$startdir} excluded");
             }
         }
     }
     self::$d_arr = array_filter(self::$d_arr);
     if (sizeof(self::$d_arr) != 0) {
         $data = implode("\n", self::$d_arr);
         fwrite(self::$fpd, $data);
         self::debug("Found {$data}");
         self::$count++;
     } else {
         self::debug("Queue finished");
     }
 }