Private
Public Access
2
0

mraa.c added internal helper functions to support globbing and link analysis

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Michael Ring
2015-02-15 12:47:11 +01:00
committed by Brendan Le Foll
parent 2965665fee
commit 8e305a1032
2 changed files with 79 additions and 0 deletions

View File

@@ -59,6 +59,31 @@ mraa_platform_t mraa_x86_platform();
*/
mraa_platform_t mraa_arm_platform();
/**
* helper function to check if file exists
*
* @param filename to check
* @return mraa_boolean_t boolean result.
*/
mraa_boolean_t mraa_file_exist(char *filename);
/**
* helper function to unglob filenames
*
* @param filename to unglob
* @return char * with the existing filename matching the pattern of input. NULL if there is no match. Caller must free result
*/
char * mraa_file_unglob(char *filename);
/**
* helper function to find out if file that is targeted by a softlink (partially) matches the given name
*
* @param filename of the softlink
* @param (partial) filename that is matched with the filename of the link-targeted file
* @return mraa_boolean_t true when targetname (partially) matches
*/
mraa_boolean_t mraa_link_targets(char *filename,char *targetname);
#ifdef __cplusplus
}
#endif