+void repositoryShow (struct recordGroup *rGroup)
+{
+ char src[1024];
+ int src_len;
+ struct dirs_entry *dst;
+ Dict dict;
+ struct dirs_info *di;
+
+ if (!(dict = dict_open (rGroup->bfs, FMATCH_DICT, 50, 0)))
+ {
+ logf (LOG_FATAL, "dict_open fail of %s", FMATCH_DICT);
+ return;
+ }
+
+ assert (rGroup->path);
+ strcpy (src, rGroup->path);
+ src_len = strlen (src);
+
+ if (src_len && src[src_len-1] != '/')
+ {
+ src[src_len] = '/';
+ src[++src_len] = '\0';
+ }
+
+ di = dirs_open (dict, src, rGroup->flagRw);
+
+ while ( (dst = dirs_read (di)) )
+ logf (LOG_LOG, "%s", dst->path);
+ dirs_free (&di);
+ dict_close (dict);
+}
+
+static void fileUpdate (Dict dict, struct recordGroup *rGroup,
+ const char *path)
+{
+ struct dirs_info *di;
+ struct stat sbuf;
+ char src[1024];
+ char dst[1024];
+ int src_len;
+
+ assert (path);
+ strcpy (src, path);
+ src_len = strlen (src);
+
+ stat (src, &sbuf);
+ if (S_ISREG(sbuf.st_mode))
+ {
+ struct dirs_entry *e_dst;
+ di = dirs_fopen (dict, src);
+
+ e_dst = dirs_read (di);
+ if (e_dst)
+ {
+ if (sbuf.st_mtime > e_dst->mtime)
+ if (fileExtract (&e_dst->sysno, src, rGroup, 0))
+ dirs_add (di, src, e_dst->sysno, sbuf.st_mtime);
+ }
+ else
+ {
+ SYSNO sysno = 0;
+ if (fileExtract (&sysno, src, rGroup, 0))
+ dirs_add (di, src, sysno, sbuf.st_mtime);
+ }
+ dirs_free (&di);
+ }
+ else if (S_ISDIR(sbuf.st_mode))
+ {
+ if (src_len && src[src_len-1] != '/')
+ {
+ src[src_len] = '/';
+ src[++src_len] = '\0';
+ }
+ di = dirs_open (dict, src, rGroup->flagRw);
+ *dst = '\0';
+ fileUpdateR (di, dirs_read (di), src, dst, rGroup);
+ dirs_free (&di);
+ }
+ else
+ {
+ logf (LOG_WARN, "Ignoring path %s", src);
+ }
+}
+
+
+static void repositoryExtract (int deleteFlag, struct recordGroup *rGroup,
+ const char *path)