}
+/**
+ * Test if a given entry represents a directory.
+ *
+ * @param ent check if this FI represents a directory
+ * @return GNUNET_YES if so, GNUNET_NO if not
+ */
+int
+GNUNET_FS_file_information_is_directory (struct GNUNET_FS_FileInformation *ent)
+{
+ return ent->is_directory;
+}
+
+
/**
* Create an entry for an empty directory in a publish-structure.
* This function should be used by applications for which the
void *proc_cls)
{
struct GNUNET_FS_FileInformation *pos;
+ int no;
+ no = GNUNET_NO;
if (GNUNET_OK !=
proc (proc_cls,
dir,
&dir->keywords,
&dir->anonymity,
&dir->priority,
+ (dir->is_directory) ? &no : &dir->data.file.do_index,
&dir->expirationTime,
&dir->client_info))
return;
pos = dir->data.dir.entries;
while (pos != NULL)
{
+ no = GNUNET_NO;
if (GNUNET_OK !=
proc (proc_cls,
pos,
&pos->keywords,
&pos->anonymity,
&pos->priority,
+ (dir->is_directory) ? &no : &dir->data.file.do_index,
&pos->expirationTime,
&pos->client_info))
break;
void *cleaner_cls)
{
struct GNUNET_FS_FileInformation *pos;
+ int no;
+ no = GNUNET_NO;
if (fi->is_directory)
{
/* clean up directory */
&fi->keywords,
&fi->anonymity,
&fi->priority,
+ &no,
&fi->expirationTime,
&fi->client_info);
GNUNET_free_non_null (fi->data.dir.dir_data);
&fi->keywords,
&fi->anonymity,
&fi->priority,
+ &fi->data.file.do_index,
&fi->expirationTime,
&fi->client_info);
}