#include <time.h>
#include <strings.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <unistd.h>
Include dependency graph for gphoto2-port-portability.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | _XOPEN_SOURCE 500 |
#define | _POSIX_C_SOURCE 199309 |
#define | GP_SYSTEM_SLEEP(_ms) |
#define | gp_system_dir DIR * |
#define | gp_system_dirent struct dirent * |
#define | gp_system_dir_delim '/' |
Functions | |
int | gp_system_mkdir (const char *dirname) |
mkdir UNIX functionality | |
int | gp_system_rmdir (const char *dirname) |
rmdir UNIX functionality | |
gp_system_dir | gp_system_opendir (const char *dirname) |
opendir UNIX functionality | |
gp_system_dirent | gp_system_readdir (gp_system_dir d) |
readdir UNIX functionality | |
const char * | gp_system_filename (gp_system_dirent de) |
retrieve UNIX filename out of a directory entry | |
int | gp_system_closedir (gp_system_dir dir) |
closedir UNIX functionality | |
int | gp_system_is_file (const char *filename) |
check if passed filename is a file | |
int | gp_system_is_dir (const char *dirname) |
check if passed filename is a directory |
#define gp_system_dir DIR * |
A system directory handle
#define gp_system_dir_delim '/' |
The directory delimiter character on this platform.
#define gp_system_dirent struct dirent * |
A system directory entry
#define GP_SYSTEM_SLEEP | ( | _ms | ) |
Value:
do { \ const struct timespec req = { \ 0, \ 1000*1000*((long)(_ms)) \ }; \ nanosleep(&req, NULL); \ } while (0)
int gp_system_closedir | ( | gp_system_dir | dir | ) |
closedir UNIX functionality
dir | directory to close |
const char* gp_system_filename | ( | gp_system_dirent | de | ) |
retrieve UNIX filename out of a directory entry
de | directory entry as returned from gp_system_readdir() |
int gp_system_is_dir | ( | const char * | dirname | ) |
check if passed filename is a directory
dirname | file name to check |
int gp_system_is_file | ( | const char * | filename | ) |
check if passed filename is a file
filename | file name to check |
int gp_system_mkdir | ( | const char * | dirname | ) |
mkdir UNIX functionality
dirname | directory to create |
gp_system_dir gp_system_opendir | ( | const char * | dirname | ) |
opendir UNIX functionality
dirname | directory to open |
gp_system_dirent gp_system_readdir | ( | gp_system_dir | d | ) |
readdir UNIX functionality
d | directory to enumerate |
int gp_system_rmdir | ( | const char * | dirname | ) |
rmdir UNIX functionality
dirname | directory to remove |