Files
obitools3/src/private_at_functions.h
Celine Mercier c59a244e9d Fixed little typo
2015-09-30 12:07:13 +02:00

59 lines
1.9 KiB
C

/****************************************************************************
* Header file for private *at functions *
****************************************************************************/
/**
* @file private_at_functions.h
* @author Celine Mercier (celine.mercier@metabarcoding.org)
* @date 15 June 2015
* @brief Header file for the private replacement functions for *at functions.
*/
#ifndef PRIVATE_OPENAT_H_
#define PRIVATE_OPENAT_H_
#include <sys/stat.h>
#define MAX_PATH_LEN 4096 /**< Maximum length for the character string defining a
file or directory path */
/**
* @brief Internal function getting the full path of a file or a directory from its
* path relative to a directory file descriptor.
*
* @warning The returned pointer has to be freed by the caller.
*
* @param directory_file_descriptor The file descriptor for the directory to which
* path_name is relative.
* @param path_name The path name for the file or directory, relative to directory_file_descriptor.
*
* @returns A pointer to the full path.
* @retval NULL if an error occurred.
*
* @since June 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
char* get_full_path(int directory_file_descriptor, const char* path_name);
/**
* @brief Replacement function for opendirat() : open a directory relative to a directory file descriptor.
*
* @param directory_file_descriptor The file descriptor for the directory in which the directory should be opened.
* @param path_name The path name for the directory to be opened, relative to directory_file_descriptor.
*
* @returns The file descriptor of the opened directory.
* @retval NULL if an error occurred.
*
* @since June 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
DIR* private_opendirat(int directory_file_descriptor, const char* path_name);
#endif /* PRIVATEOPENAT_H_ */