- case 'd':
- if (check)
- {
- if (GNUNET_disk_directory_test (NULL, s) == GNUNET_NO)
- {
- index = -1;
- done = 1;
- }
- }
- else
- {
- GNUNET_disk_directory_create (NULL, s);
- }
- if (!done)
- index = makeHierarchyHelper (s, tree, index, check);
- break;
- case 'f':
- if (check)
- {
- /* TODO: compare file contents */
- if (GNUNET_disk_directory_test (NULL, s) != GNUNET_NO)
- {
- index = -1;
- done = 1;
- }
- }
- else
- {
- buf = GNUNET_malloc (FILESIZE);
- for (i = 0; i < FILESIZE; i++)
- buf[i] = GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK, 256);
- GNUNET_disk_file_write (ectx, s, buf, FILESIZE, "600");
- GNUNET_free (buf);
- }
- break;
- case '.':