is dir test
authorChristian Grothoff <christian@grothoff.org>
Wed, 16 Jun 2010 11:34:03 +0000 (11:34 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 16 Jun 2010 11:34:03 +0000 (11:34 +0000)
src/fs/fs_file_information.c
src/include/gnunet_fs_service.h

index c04c5a56ea263f20567e12b6bf5afa2198878368..367061cae578fa3bb3398ca759024a57793fc2bf 100644 (file)
@@ -627,6 +627,19 @@ GNUNET_FS_file_information_create_from_directory (struct GNUNET_FS_Handle *h,
 }
 
 
+/**
+ * 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
index 90fde35f5e5dba4aa4f3feb9b543456f82a9ac9d..a200406d5e7a1dff2446a262714a33d391395a9e 100644 (file)
@@ -1896,6 +1896,16 @@ GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle *h,
                                                   struct GNUNET_TIME_Absolute expirationTime);
 
 
+/**
+ * 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);
+
+
 /**
  * Add an entry to a directory in a publish-structure.  Clients
  * should never modify publish structures that were passed to