X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fdirectory-handle.h;h=b6ee8b3846fdc7a70a77f19c295ab49b23bd3555;hb=9a1a997f2f22b556f63437d911b98c7b522b38e4;hp=0ad5c851072ab68de75788aeeb42c657dbd19e8c;hpb=0e98551307eb5a7a59cc74982b386dc95f4c4f89;p=lttng-tools.git diff --git a/src/common/compat/directory-handle.h b/src/common/compat/directory-handle.h index 0ad5c8510..b6ee8b384 100644 --- a/src/common/compat/directory-handle.h +++ b/src/common/compat/directory-handle.h @@ -18,8 +18,9 @@ #ifndef _COMPAT_DIRECTORY_HANDLE_H #define _COMPAT_DIRECTORY_HANDLE_H -#include #include +#include +#include #include enum lttng_directory_handle_rmdir_recursive_flags { @@ -257,6 +258,23 @@ 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); + +/* + * Returns true if this directory handle is backed by a file + * descriptor, false otherwise. + */ +LTTNG_HIDDEN +bool lttng_directory_handle_uses_fd( + const struct lttng_directory_handle *handle); + /* * Compare two directory handles. *