directory-handle: make lttng_directory_handle_stat public
[lttng-tools.git] / src / common / compat / directory-handle.h
index 0ad5c851072ab68de75788aeeb42c657dbd19e8c..551fa50b439b84c85cc6d2bfa667943836973454 100644 (file)
@@ -18,8 +18,9 @@
 #ifndef _COMPAT_DIRECTORY_HANDLE_H
 #define _COMPAT_DIRECTORY_HANDLE_H
 
-#include <common/macros.h>
 #include <common/credentials.h>
+#include <common/macros.h>
+#include <sys/stat.h>
 #include <urcu/ref.h>
 
 enum lttng_directory_handle_rmdir_recursive_flags {
@@ -257,6 +258,15 @@ int lttng_directory_handle_remove_subdirectory_recursive_as_user(
                const struct lttng_credentials *creds,
                int flags);
 
+/*
+ * stat() a file relative to a directory handle.
+ */
+LTTNG_HIDDEN
+int lttng_directory_handle_stat(
+               const struct lttng_directory_handle *handle,
+               const char *name,
+               struct stat *stat_buf);
+
 /*
  * Compare two directory handles.
  *
This page took 0.0239 seconds and 4 git commands to generate.